dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/include
Frederic Weisbecker fa5058f3b6 cputime: Specialize irq vtime hooks
With CONFIG_VIRT_CPU_ACCOUNTING, when vtime_account()
is called in irq entry/exit, we perform a check on the
context: if we are interrupting the idle task we
account the pending cputime to idle, otherwise account
to system time or its sub-areas: tsk->stime, hardirq time,
softirq time, ...

However this check for idle only concerns the hardirq entry
and softirq entry:

* Hardirq may directly interrupt the idle task, in which case
we need to flush the pending CPU time to idle.

* The idle task may be directly interrupted by a softirq if
it calls local_bh_enable(). There is probably no such call
in any idle task but we need to cover every case. Ksoftirqd
is not concerned because the idle time is flushed on context
switch and softirq in the end of hardirq have the idle time
already flushed from the hardirq entry.

In the other cases we always account to system/irq time:

* On hardirq exit we account the time to hardirq time.
* On softirq exit we account the time to softirq time.

To optimize this and avoid the indirect call to vtime_account()
and the checks it performs, specialize the vtime irq APIs and
only perform the check on irq entry. Irq exit can directly call
vtime_account_system().

CONFIG_IRQ_TIME_ACCOUNTING behaviour doesn't change and directly
maps to its own vtime_account() implementation. One may want
to take benefits from the new APIs to optimize irq time accounting
as well in the future.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-10-29 21:31:32 +01:00
..
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-10-08 07:14:06 +09:00
asm-generic UAPI: Remove empty non-UAPI Kbuild files 2012-10-17 12:31:15 +01:00
clocksource
crypto Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
drm UAPI: Remove empty non-UAPI Kbuild files 2012-10-17 12:31:15 +01:00
keys KEYS: Asymmetric key pluggable data parsers 2012-10-08 13:50:13 +10:30
linux cputime: Specialize irq vtime hooks 2012-10-29 21:31:32 +01:00
math-emu
media Merge branch 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung into drm-next 2012-10-07 21:06:33 +10:00
memory
misc
net ipv4: Add FLOWI_FLAG_KNOWN_NH 2012-10-08 17:42:36 -04:00
pcmcia
ras
rdma infiniband: pass rdma_cm module to netlink_dump_start 2012-10-07 00:30:56 -04:00
rxrpc
scsi SCSI misc on 20121012 2012-10-13 10:57:01 +09:00
sound Sound updates for 3.7-rc1 2012-10-09 07:07:14 +09:00
target target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough 2012-10-02 14:16:08 -07:00
trace Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2012-10-10 10:49:20 +09:00
uapi TTY fixes for 3.7-rc2 2012-10-19 11:28:59 -07:00
video fbdev updates for 3.7 2012-10-12 10:21:02 +09:00
xen Bug-fixes: 2012-10-24 05:17:27 +03:00
Kbuild UAPI: Remove empty non-UAPI Kbuild files 2012-10-17 12:31:15 +01:00