Frederic Weisbecker
abf917cd91
cputime: Generic on-demand virtual cputime accounting
...
If we want to stop the tick further idle, we need to be
able to account the cputime without using the tick.
Virtual based cputime accounting solves that problem by
hooking into kernel/user boundaries.
However implementing CONFIG_VIRT_CPU_ACCOUNTING require
low level hooks and involves more overhead. But we already
have a generic context tracking subsystem that is required
for RCU needs by archs which plan to shut down the tick
outside idle.
This patch implements a generic virtual based cputime
accounting that relies on these generic kernel/user hooks.
There are some upsides of doing this:
- This requires no arch code to implement CONFIG_VIRT_CPU_ACCOUNTING
if context tracking is already built (already necessary for RCU in full
tickless mode).
- We can rely on the generic context tracking subsystem to dynamically
(de)activate the hooks, so that we can switch anytime between virtual
and tick based accounting. This way we don't have the overhead
of the virtual accounting when the tick is running periodically.
And one downside:
- There is probably more overhead than a native virtual based cputime
accounting. But this relies on hooks that are already set anyway.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
2013-01-27 19:23:27 +01:00
..
bitops
Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
2012-10-14 13:39:34 -07:00
4level-fixup.h
atomic-long.h
atomic.h
Remove all #inclusions of asm/system.h
2012-03-28 18:30:03 +01:00
atomic64.h
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
barrier.h
Create asm-generic/barrier.h
2012-03-28 18:30:03 +01:00
bitops.h
bitsperlong.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
bug.h
bug.h: Fix up CONFIG_BUG=n implicit function declarations.
2012-06-25 10:32:49 -07:00
bugs.h
cache.h
cacheflush.h
checksum.h
Add extra arch overrides to asm-generic/checksum.h
2011-11-01 07:34:21 -07:00
clkdev.h
asm-generic: Add default clkdev.h
2012-10-03 21:33:53 +02:00
cmpxchg-local.h
cmpxchg.h
asm-generic: add linux/types.h to cmpxchg.h
2012-04-02 14:41:27 -07:00
cputime.h
cputime: Generic on-demand virtual cputime accounting
2013-01-27 19:23:27 +01:00
cputime_jiffies.h
cputime: Move default nsecs_to_cputime() to jiffies based cputime file
2013-01-27 19:23:25 +01:00
cputime_nsecs.h
cputime: Generic on-demand virtual cputime accounting
2013-01-27 19:23:27 +01:00
current.h
delay.h
device.h
div64.h
dma-coherent.h
common: dma-mapping: add support for generic dma_mmap_* calls
2012-07-30 12:25:46 +02:00
dma-contiguous.h
mm: cma: fix condition check when setting global cma area
2012-07-06 12:02:04 +02:00
dma-mapping-broken.h
dma-mapping-common.h
common: dma-mapping: introduce dma_get_sgtable() function
2012-07-30 12:25:46 +02:00
dma.h
emergency-restart.h
exec.h
Split arch_align_stack() out from asm-generic/system.h
2012-03-28 18:30:03 +01:00
fb.h
ftrace.h
futex.h
getorder.h
bitops: Add missing parentheses to new get_order macro
2012-02-24 10:39:27 -08:00
gpio.h
GPIO follow up patch and type change for v3.5 merge window
2012-12-11 13:00:56 -08:00
hardirq.h
hw_irq.h
ide_iops.h
int-l64.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
int-ll64.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
io-64-nonatomic-hi-lo.h
asm-generic: architecture independent readq/writeq for 32bit environment
2012-02-21 16:47:28 -08:00
io-64-nonatomic-lo-hi.h
asm-generic: architecture independent readq/writeq for 32bit environment
2012-02-21 16:47:28 -08:00
io.h
These are a few cleanups for asm-generic:
2012-12-21 16:39:08 -08:00
ioctl.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
iomap.h
[PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
2012-02-27 09:43:30 -06:00
irq.h
irq_regs.h
irqflags.h
Kbuild.asm
UAPI: Set up uapi/asm/Kbuild.asm
2012-10-02 18:01:56 +01:00
kdebug.h
kmap_types.h
asm-generic: remove km_type definitions
2012-07-24 15:27:30 +08:00
kvm_para.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
libata-portmap.h
linkage.h
local.h
local64.h
memory_model.h
mm: fix __page_to_pfn for a const struct page argument
2011-08-17 13:00:20 -07:00
mm_hooks.h
mmu.h
asm-generic/mmu.h: Add support for FDPIC
2012-12-09 23:14:14 +01:00
mmu_context.h
module.h
Make most arch asm/module.h files use asm-generic/module.h
2012-09-28 14:31:03 +09:30
mutex-dec.h
mutex-null.h
mutex-xchg.h
mutex: Place lock in contended state after fastpath_lock failure
2012-08-13 18:46:54 +02:00
mutex.h
page.h
The following changes since commit 3ee72ca992
2012-01-10 17:39:40 -08:00
param.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
parport.h
include: remove __dev* attributes.
2013-01-03 15:57:16 -08:00
pci-bridge.h
PCI: work around Stratus ftServer broken PCIe hierarchy
2012-04-30 15:21:02 -06:00
pci-dma-compat.h
pci.h
PCI: collapse pcibios_resource_to_bus
2012-02-23 20:19:04 -07:00
pci_iomap.h
[PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
2012-02-27 09:43:30 -06:00
percpu.h
pgalloc.h
pgtable-nopmd.h
pgtable-nopud.h
pgtable.h
Automatic NUMA Balancing V11
2012-12-16 15:18:08 -08:00
ptrace.h
resource.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
rtc.h
rwsem.h
Hexagon: Add locking types and functions
2011-11-01 07:34:20 -07:00
scatterlist.h
sections.h
segment.h
serial.h
siginfo.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
signal.h
unify default ptrace_signal_deliver
2012-11-29 00:01:23 -05:00
sizes.h
ARM: 7430/1: sizes.h: move from asm-generic to <linux/sizes.h>
2012-06-28 17:14:34 +01:00
spinlock.h
statfs.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
string.h
switch_to.h
Split the switch_to() wrapper out of asm-generic/system.h
2012-03-28 18:30:03 +01:00
syscall.h
asm/syscall.h: add syscall_get_arch
2012-04-14 11:13:19 +10:00
syscalls.h
take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h
2012-11-28 23:43:27 -05:00
termios-base.h
termios.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
timex.h
tlb.h
mm: limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT
2013-01-04 16:11:46 -08:00
tlbflush.h
BUG: headers with BUG/BUG_ON etc. need linux/bug.h
2012-03-04 17:54:34 -05:00
topology.h
trace_clock.h
tracing,x86: Add a TSC trace_clock
2012-11-13 15:48:27 -05:00
uaccess-unaligned.h
uaccess.h
fix default __strnlen_user macro
2011-10-06 19:47:12 -04:00
unaligned.h
unistd.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
user.h
vga.h
vmlinux.lds.h
vmlinux.lds.h: Allow architectures to add sections to the front of .bss
2012-10-11 11:02:37 +02:00
word-at-a-time.h
word-at-a-time: make the interfaces truly generic
2012-05-26 11:33:40 -07:00
xor.h
asm-generic: xor: mark static functions as __maybe_unused
2012-10-03 21:21:06 +02:00