linux/include
Srivatsa Vaddagiri d842de871c sched: cpu accounting controller (V2)
Commit cfb5285660 removed a useful feature for
us, which provided a cpu accounting resource controller.  This feature would be
useful if someone wants to group tasks only for accounting purpose and doesnt
really want to exercise any control over their cpu consumption.

The patch below reintroduces the feature. It is based on Paul Menage's
original patch (Commit 62d0df6406), with
these differences:

        - Removed load average information. I felt it needs more thought (esp
	  to deal with SMP and virtualized platforms) and can be added for
	  2.6.25 after more discussions.
        - Convert group cpu usage to be nanosecond accurate (as rest of the cfs
	  stats are) and invoke cpuacct_charge() from the respective scheduler
	  classes
	- Make accounting scalable on SMP systems by splitting the usage
	  counter to be per-cpu
	- Move the code from kernel/cpu_acct.c to kernel/sched.c (since the
	  code is not big enough to warrant a new file and also this rightly
	  needs to live inside the scheduler. Also things like accessing
	  rq->lock while reading cpu usage becomes easier if the code lived in
	  kernel/sched.c)

The patch also modifies the cpu controller not to provide the same accounting
information.

Tested-by: Balbir Singh <balbir@linux.vnet.ibm.com>

 Tested the patches on top of 2.6.24-rc3. The patches work fine. Ran
 some simple tests like cpuspin (spin on the cpu), ran several tasks in
 the same group and timed them. Compared their time stamps with
 cpuacct.usage.

Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-12-02 20:04:49 +01:00
..
acpi Pull cpuidle into release branch 2007-11-20 01:18:37 -05:00
asm-alpha Add CONFIG_DEBUG_SG sg validation 2007-10-22 21:20:03 +02:00
asm-arm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-11-30 08:11:18 -08:00
asm-avr32 [AVR32] Add missing bit in PCCR sysreg 2007-11-15 13:47:20 +01:00
asm-blackfin Blackfin arch: split apart dump_bfin_regs and merge/remove show_regs from process.c, which was largely duplicated 2007-11-21 16:46:49 +08:00
asm-cris CRIS tlb.h should include linux/pagemap.h 2007-11-14 18:45:47 -08:00
asm-frv frv: Remove bogus NO_IRQ = -1 define 2007-11-09 15:11:44 -08:00
asm-generic sched: fix RLIMIT_CPU comment 2007-11-26 21:21:49 +01:00
asm-h8300 Add CONFIG_DEBUG_SG sg validation 2007-10-22 21:20:03 +02:00
asm-ia64 ACPI: Set max_cstate to 1 for early Opterons. 2007-11-26 20:42:19 +01:00
asm-m32r m32r: Update sys_rt_sigsuspend 2007-11-28 01:24:04 +09:00
asm-m68k Add CONFIG_DEBUG_SG sg validation 2007-10-22 21:20:03 +02:00
asm-m68knommu m68knommu: fix pread/pwrite defines 2007-11-05 15:12:33 -08:00
asm-mips [MIPS] Fix use of smp_processor_id() in preemptible code. 2007-12-01 00:39:37 +00:00
asm-parisc parisc: fix sg_page() fallout 2007-10-23 09:49:31 +02:00
asm-powerpc [POWERPC] Fix RTAS os-term usage on kernel panic 2007-11-20 16:10:09 +11:00
asm-ppc ppc: fix AT_VECTOR_SIZE on arch/ppc 2007-10-22 19:18:54 -07:00
asm-s390 [S390] Fix irq tracing and lockdep_sys_exit calls. 2007-11-20 11:13:45 +01:00
asm-sh sh: Fix copy_{to,from}_user_page() with cache disabled. 2007-11-19 12:55:51 +09:00
asm-sh64 sh: remove PTRACE_O_TRACESYSGOOD from asm/ptrace.h 2007-11-07 11:13:54 +09:00
asm-sparc [SPARC32]: __inline__ --> inline 2007-10-27 00:17:01 -07:00
asm-sparc64 [SPARC64]: Use "is_power_of_2" macro for simplicity. 2007-11-07 02:24:33 -08:00
asm-um uml: update address space affected by pud_clear 2007-11-14 18:45:37 -08:00
asm-v850 Add CONFIG_DEBUG_SG sg validation 2007-10-22 21:20:03 +02:00
asm-x86 x86: fix ACPI compile for LOCAL_APIC=n 2007-11-26 20:42:19 +01:00
asm-xtensa xtensa: dma-mapping.h is using linux/scatterlist.h functions, so include it 2007-10-24 13:28:40 +02:00
crypto
keys
linux sched: cpu accounting controller (V2) 2007-12-02 20:04:49 +01:00
math-emu
media [PATCH] Fix breakage after SG cleanups 2007-10-23 12:02:39 -07:00
mtd
net [IPV4]: Fix memory leak in inet_hashtables.h when NUMA is on 2007-11-26 20:23:31 +08:00
pcmcia [AVR32] pcmcia ioaddr_t should be 32 bits on AVR32 2007-11-15 13:47:19 +01:00
rdma cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
rxrpc
scsi SCSI: add asynchronous event notification API 2007-11-03 22:23:02 -04:00
sound [ALSA] version 1.0.15 2007-11-20 20:16:43 +01:00
video Make asm-x86/bootparam.h includable from userspace. 2007-10-23 15:49:47 +10:00
xen
Kbuild