cputime: More cleanups v2
Hi Ingo, Thomas,
Seconds take for these cleanups (and more are to come). I haven't got reviews in two weeks so I'm resending with a pull request.
Changes in v2:
* Fix wrong condition when using is_idle_task() (patch 2/6)
* Remove unnecessary !S390 dependency for finegrained irqtime accounting option (reported by Russell King)
Please pull from:
git://github.com/fweisbec/linux-dynticks.git
cputime/cleanups-v2
It is based on tip:sched/core
Thanks.
Frederic Weisbecker (6):
cputime: Use a proper subsystem naming for vtime related APIs
vtime: Consolidate system/idle context detection
ia64: Consolidate user vtime accounting
ia64: Reuse system and user vtime accounting functions on task switch
cputime: Gather time/stats accounting config options into a single
menu
cputime: Make finegrained irqtime accounting generally available
arch/Kconfig | 6 ++ arch/ia64/kernel/time.c | 64 +++++++++--------- arch/powerpc/kernel/time.c | 53 ++++++++------ arch/s390/include/asm/cputime.h | 3 + arch/s390/kernel/vtime.c | 6 +- arch/x86/Kconfig | 12 +--- include/linux/hardirq.h | 8 +- include/linux/kernel_stat.h | 6 +- include/linux/kvm_host.h | 4 +- init/Kconfig | 146 ++++++++++++++++++++++++--------------- kernel/sched/core.c | 2 +- kernel/sched/cputime.c | 34 ++++++++- kernel/softirq.c | 6 +- 13 files changed, 209 insertions(+), 141 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/6 cputime: Use a proper subsystem naming for vtime related APIs
Use a naming based on vtime as a prefix for virtual based cputime accounting APIs:
- account_system_vtime() -> vtime_account()
- account_switch_vtime() -> vtime_task_switch()
It makes it easier to allow for further declension such as vtime_account_system(), vtime_account_idle(), ... if we want to find out the context we account to from generic code.
This also make it better to know on which subsystem these APIs refer to.
--- arch/ia64/kernel/time.c | 6 +++--- arch/powerpc/kernel/time.c | 10 +++++----- arch/s390/kernel/vtime.c | 6 +++--- include/linux/hardirq.h | 8 ++++---- include/linux/kernel_stat.h | 4 ++-- include/linux/kvm_host.h | 4 ++-- kernel/sched/core.c | 2 +- kernel/sched/cputime.c | 8 ++++---- kernel/softirq.c | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-)
arch/ia64/kernel/time.c +3 -3
@@ -88,7 +88,7 @@ extern cputime_t cycle_to_cputime(u64 cyc);* accumulated times to the current process, and to prepare accounting on * the next process. */ -void account_switch_vtime (struct task_struct *prev) +void vtime_task_switch (struct task_struct *prev) {struct thread_info *pi =task_thread_info (prev);struct thread_info *ni =task_thread_info (current);
@@ -116,7 +116,7 @@ void account_switch_vtime(struct task_struct *prev)* Account time for a transition between system, hard irq or soft irq state. * Note that this function is called with interrupts enabled. */ -void account_system_vtime (struct task_struct *tsk) +void vtime_account (struct task_struct *tsk) {struct thread_info *ti =task_thread_info (tsk);unsigned long flags;
@@ -138,7 +138,7 @@ void account_system_vtime(struct task_struct *tsk)local_irq_restore (flags); } -EXPORT_SYMBOL_GPL (account_system_vtime); +EXPORT_SYMBOL_GPL (vtime_account);/* * Called from the timer interrupt handler to charge accumulated user time
arch/powerpc/kernel/time.c +5 -5
@@ -291,7 +291,7 @@ static inline u64 calculate_stolen_time(u64 stop_tb)* Account time for a transition between system, hard irq * or soft irq state. */ -void account_system_vtime (struct task_struct *tsk) +void vtime_account (struct task_struct *tsk) {u64 now, nowscaled, delta, deltascaled;unsigned long flags;
@@ -343,14 +343,14 @@ void account_system_vtime(struct task_struct *tsk) }local_irq_restore (flags); } -EXPORT_SYMBOL_GPL (account_system_vtime); +EXPORT_SYMBOL_GPL (vtime_account);/* * Transfer the user and system times accumulated in the paca * by the exception entry and exit code to the generic process * user and system time records. * Must be called with interrupts disabled. -* Assumes that account_system_vtime() has been called recently +* Assumes that vtime_account() has been called recently * (i.e. since the last entry from usermode) so that * get_paca()->user_time_scaled is up to date. */
@@ -366,9 +366,9 @@ void account_process_tick(struct task_struct *tsk, int user_tick)account_user_time (tsk, utime, utimescaled); } -void account_switch_vtime (struct task_struct *prev) +void vtime_task_switch (struct task_struct *prev) { -account_system_vtime (prev); +vtime_account (prev);account_process_tick (prev,0 ); }
arch/s390/kernel/vtime.c +3 -3
@@ -99,7 +99,7 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset)return virt_timer_forward (user + system); } -void account_switch_vtime (struct task_struct *prev) +void vtime_task_switch (struct task_struct *prev) {struct thread_info *ti;
@@ -122,7 +122,7 @@ void account_process_tick(struct task_struct *tsk, int user_tick)* Update process times based on virtual cpu times stored by entry.S * to the lowcore fields user_timer, system_timer & steal_clock. */ -void account_system_vtime (struct task_struct *tsk) +void vtime_account (struct task_struct *tsk) {struct thread_info *ti =task_thread_info (tsk);u64 timer, system;
@@ -138,7 +138,7 @@ void account_system_vtime(struct task_struct *tsk)virt_timer_forward (system); } -EXPORT_SYMBOL_GPL (account_system_vtime); +EXPORT_SYMBOL_GPL (vtime_account);void __kprobes vtime_stop_cpu (void ) {
include/linux/hardirq.h +4 -4
@@ -132,11 +132,11 @@ extern void synchronize_irq(unsigned int irq);struct task_struct ;#if !defined(CONFIG_VIRT_CPU_ACCOUNTING ) && !defined(CONFIG_IRQ_TIME_ACCOUNTING ) -static inline void account_system_vtime (struct task_struct *tsk) +static inline void vtime_account (struct task_struct *tsk) { }#else -extern void account_system_vtime (struct task_struct *tsk); +extern void vtime_account (struct task_struct *tsk);#endif #if defined(CONFIG_TINY_RCU ) || defined(CONFIG_TINY_PREEMPT_RCU )
@@ -162,7 +162,7 @@ extern void rcu_nmi_exit(void);*/ #define __irq_enter () \ do { \ - account_system_vtime(current); \ + vtime_account(current); \ add_preempt_count(HARDIRQ_OFFSET); \ trace_hardirq_enter(); \ } while (0)
@@ -178,7 +178,7 @@ extern void irq_enter(void);#define __irq_exit () \ do { \ trace_hardirq_exit(); \ - account_system_vtime(current); \ + vtime_account(current); \ sub_preempt_count(HARDIRQ_OFFSET); \ } while (0)
include/linux/kernel_stat.h +2 -2
@@ -131,9 +131,9 @@ extern void account_steal_ticks(unsigned long ticks);extern void account_idle_ticks (unsigned long ticks);#ifdef CONFIG_VIRT_CPU_ACCOUNTING -extern void account_switch_vtime (struct task_struct *prev); +extern void vtime_task_switch (struct task_struct *prev);#else -static inline void account_switch_vtime (struct task_struct *prev) { } +static inline void vtime_task_switch (struct task_struct *prev) { }#endif #endif /* _LINUX_KERNEL_STAT_H */
include/linux/kvm_host.h +2 -2
@@ -685,7 +685,7 @@ static inline int kvm_deassign_device(struct kvm *kvm,static inline void kvm_guest_enter (void ) {BUG_ON (preemptible ()); -account_system_vtime (current); +vtime_account (current); current->flags |=PF_VCPU ;/* KVM does not hold any references to rcu protected data when it * switches CPU into a guest mode. In fact switching to a guest mode
@@ -699,7 +699,7 @@ static inline void kvm_guest_enter(void)static inline void kvm_guest_exit (void ) { -account_system_vtime (current); +vtime_account (current); current->flags &= ~PF_VCPU ; }
kernel/sched/core.c +1 -1
@@ -1764,7 +1764,7 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev)* Manfred Spraul <[email protected]> */ prev_state = prev->state; -account_switch_vtime (prev); +vtime_task_switch (prev);finish_arch_switch (prev);perf_event_task_sched_in (prev, current);finish_lock_switch (rq, prev);
kernel/sched/cputime.c +4 -4
@@ -10,11 +10,11 @@/* * There are no locks covering percpu hardirq/softirq time. -* They are only modified in account_system_vtime, on corresponding CPU +* They are only modified in vtime_account, on corresponding CPU * with interrupts disabled. So, writes are safe. * They are read and saved off onto struct rq in update_rq_clock(). * This may result in other CPU reading this CPU's irq time and can -* race with irq/account_system_vtime on this CPU. We would either get old +* race with irq/vtime_account on this CPU. We would either get old * or new value with a side effect of accounting a slice of irq time to wrong * task when irq is in progress while we read rq->clock. That is a worthy * compromise in place of having locks on each irq in account_system_time.
@@ -43,7 +43,7 @@ DEFINE_PER_CPU(seqcount_t, irq_time_seq);* Called before incrementing preempt_count on {soft,}irq_enter * and before decrementing preempt_count on {soft,}irq_exit. */ -void account_system_vtime (struct task_struct *curr) +void vtime_account (struct task_struct *curr) {unsigned long flags;s64 delta;
@@ -73,7 +73,7 @@ void account_system_vtime(struct task_struct *curr)irq_time_write_end ();local_irq_restore (flags); } -EXPORT_SYMBOL_GPL (account_system_vtime); +EXPORT_SYMBOL_GPL (vtime_account);static int irqtime_account_hi_update (void ) {
kernel/softirq.c +3 -3
@@ -220,7 +220,7 @@ asmlinkage void __do_softirq(void) current->flags &= ~PF_MEMALLOC ; pending =local_softirq_pending (); -account_system_vtime (current); +vtime_account (current);__local_bh_disable ((unsigned long )__builtin_return_address (0 ),SOFTIRQ_OFFSET );
@@ -271,7 +271,7 @@ restart:lockdep_softirq_exit (); -account_system_vtime (current); +vtime_account (current);__local_bh_enable (SOFTIRQ_OFFSET );tsk_restore_flags (current, old_flags,PF_MEMALLOC ); }
@@ -340,7 +340,7 @@ static inline void invoke_softirq(void)*/ void irq_exit (void ) { -account_system_vtime (current); +vtime_account (current);trace_hardirq_exit ();sub_preempt_count (IRQ_EXIT_OFFSET );if (!in_interrupt () &&local_softirq_pending ())
Signature · 1 line
1.7.5.4
PATCH 2/6 vtime: Consolidate system/idle context detection
In reply to Frederic WeisbeckerMove the code that finds out to which context we account the cputime into generic layer.
Archs that consider the whole time spent in the idle task as idle time (ia64, powerpc) can rely on the generic vtime_account() and implement vtime_account_system() and vtime_account_idle(), letting the generic code to decide when to call which API.
Archs that have their own meaning of idle time, such as s390 that only considers the time spent in CPU low power mode as idle time, can just override vtime_account().
--- arch/ia64/kernel/time.c | 25 +++++++++++--------- arch/powerpc/kernel/time.c | 47 +++++++++++++++++++++++--------------- arch/s390/include/asm/cputime.h | 3 ++ include/linux/kernel_stat.h | 2 + kernel/sched/cputime.c | 26 +++++++++++++++++++++ 5 files changed, 73 insertions(+), 30 deletions(-)
arch/ia64/kernel/time.c +14 -11
@@ -116,29 +116,32 @@ void vtime_task_switch(struct task_struct *prev)* Account time for a transition between system, hard irq or soft irq state. * Note that this function is called with interrupts enabled. */ -void vtime_account (struct task_struct *tsk) +static cputime_t vtime_delta (struct task_struct *tsk) {struct thread_info *ti =task_thread_info (tsk); -unsigned long flags;cputime_t delta_stime;__u64 now; -local_irq_save (flags); - now =ia64_get_itc (); delta_stime =cycle_to_cputime (ti->ac_stime + (now - ti->ac_stamp)); -if (irq_count () ||idle_task (smp_processor_id ()) != tsk) -account_system_time (tsk,0 , delta_stime, delta_stime); -else -account_idle_time (delta_stime); ti->ac_stime =0 ; - ti->ac_stamp = now; -local_irq_restore (flags); +return delta_stime; +} + +void vtime_account_system (struct task_struct *tsk) +{ +cputime_t delta =vtime_delta (tsk); + +account_system_time (tsk,0 , delta, delta); +} + +void vtime_account_idle (struct task_struct *tsk) +{ +account_idle_time (vtime_delta (tsk)); } -EXPORT_SYMBOL_GPL (vtime_account);/* * Called from the timer interrupt handler to charge accumulated user time
arch/powerpc/kernel/time.c +28 -19
76 lines not on this page · raw message
arch/s390/include/asm/cputime.h +3 -0
@@ -12,6 +12,9 @@#include <linux/spinlock.h> #include <asm/div64.h> + +#define __ARCH_HAS_VTIME_ACCOUNT +/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ typedef unsigned long long __nocast cputime_t ;
include/linux/kernel_stat.h +2 -0
@@ -132,6 +132,8 @@ extern void account_idle_ticks(unsigned long ticks);#ifdef CONFIG_VIRT_CPU_ACCOUNTING extern void vtime_task_switch (struct task_struct *prev); +extern void vtime_account_system (struct task_struct *tsk); +extern void vtime_account_idle (struct task_struct *tsk);#else static inline void vtime_task_switch (struct task_struct *prev) { }#endif
kernel/sched/cputime.c +26 -0
@@ -432,6 +432,32 @@ void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st) *ut = cputime.utime; *st = cputime.stime; } + +/* +* Archs that account the whole time spent in the idle task +* (outside irq) as idle time can rely on this and just implement +* vtime_account_system() and vtime_account_idle(). Archs that +* have other meaning of the idle time (s390 only includes the +* time spent by the CPU when it's in low power mode) must override +* vtime_account(). +*/ +#ifndef __ARCH_HAS_VTIME_ACCOUNT +void vtime_account (struct task_struct *tsk) +{ +unsigned long flags; + +local_irq_save (flags); + +if (in_interrupt () || !is_idle_task (tsk)) +vtime_account_system (tsk); +else +vtime_account_idle (tsk); + +local_irq_restore (flags); +} +EXPORT_SYMBOL_GPL (vtime_account); +#endif /* __ARCH_HAS_VTIME_ACCOUNT */ +#else #ifndef nsecs_to_cputime
Signature · 1 line
1.7.5.4
PATCH 3/6 ia64: Consolidate user vtime accounting
In reply to Frederic WeisbeckerFactorize the code that accounts user time into a
single function to avoid code duplication.
--- arch/ia64/kernel/time.c | 28 +++++++++++++++------------- 1 files changed, 15 insertions(+), 13 deletions(-)
arch/ia64/kernel/time.c +15 -13
@@ -83,6 +83,18 @@ static struct clocksource *itc_clocksource;extern cputime_t cycle_to_cputime (u64 cyc); +static void vtime_account_user (struct task_struct *tsk) +{ +cputime_t delta_utime; +struct thread_info *ti =task_thread_info (tsk); + +if (ti->ac_utime) { + delta_utime =cycle_to_cputime (ti->ac_utime); +account_user_time (tsk, delta_utime, delta_utime); + ti->ac_utime =0 ; + } +} +/* * Called from the context switch with interrupts disabled, to charge all * accumulated times to the current process, and to prepare accounting on
@@ -92,7 +104,7 @@ void vtime_task_switch(struct task_struct *prev) {struct thread_info *pi =task_thread_info (prev);struct thread_info *ni =task_thread_info (current); -cputime_t delta_stime, delta_utime; +cputime_t delta_stime;__u64 now; now =ia64_get_itc ();
@@ -103,10 +115,7 @@ void vtime_task_switch(struct task_struct *prev)else account_idle_time (delta_stime); -if (pi->ac_utime) { - delta_utime =cycle_to_cputime (pi->ac_utime); -account_user_time (prev, delta_utime, delta_utime); - } +vtime_account_user (prev); pi->ac_stamp = ni->ac_stamp = now; ni->ac_stime = ni->ac_utime =0 ;
@@ -149,14 +158,7 @@ void vtime_account_idle(struct task_struct *tsk)*/ void account_process_tick (struct task_struct *p,int user_tick) { -struct thread_info *ti =task_thread_info (p); -cputime_t delta_utime; - -if (ti->ac_utime) { - delta_utime =cycle_to_cputime (ti->ac_utime); -account_user_time (p, delta_utime, delta_utime); - ti->ac_utime =0 ; - } +vtime_account_user (p); }#endif /* CONFIG_VIRT_CPU_ACCOUNTING */
Signature · 1 line
1.7.5.4
PATCH 4/6 ia64: Reuse system and user vtime accounting functions on task switch
In reply to Frederic WeisbeckerTo avoid code duplication.
--- arch/ia64/kernel/time.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-)
arch/ia64/kernel/time.c +3 -8
@@ -104,20 +104,15 @@ void vtime_task_switch(struct task_struct *prev) {struct thread_info *pi =task_thread_info (prev);struct thread_info *ni =task_thread_info (current); -cputime_t delta_stime; -__u64 now; - - now =ia64_get_itc (); - delta_stime =cycle_to_cputime (pi->ac_stime + (now - pi->ac_stamp));if (idle_task (smp_processor_id ()) != prev) -account_system_time (prev,0 , delta_stime, delta_stime); +vtime_account_system (prev);else -account_idle_time (delta_stime); +vtime_account_idle (prev);vtime_account_user (prev); - pi->ac_stamp = ni->ac_stamp = now; + pi->ac_stamp = ni->ac_stamp; ni->ac_stime = ni->ac_utime =0 ; }
Signature · 1 line
1.7.5.4
PATCH 5/6 cputime: Gather time/stats accounting config options into a single menu
In reply to Frederic WeisbeckerThis debloats a bit the general config menu and make these config options easier to find.
--- init/Kconfig | 116 ++++++++++++++++++++++++++++++---------------------------- 1 files changed, 60 insertions(+), 56 deletions(-)
init/Kconfig +60 -56
@@ -267,6 +267,65 @@ config POSIX_MQUEUE_SYSCTL depends on SYSCTL default y +config FHANDLE + bool "open by fhandle syscalls" + select EXPORTFS + help + If you say Y here, a user level program will be able to map + file names to handle and then later use the handle for + different file system operations. This is useful in implementing + userspace file servers, which now track files using handles instead + of names. The handle would remain the same even if file names + get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2) + syscalls. + +config AUDIT + bool "Auditing support" + depends on NET + help + Enable auditing infrastructure that can be used with another + kernel subsystem, such as SELinux (which requires this for + logging of avc messages output). Does not do system-call + auditing without CONFIG_AUDITSYSCALL. + +config AUDITSYSCALL + bool "Enable system-call auditing support" + depends on AUDIT && (X86 || PPC || S390 || IA64 || UML || SPARC64 || SUPERH || (ARM && AEABI && !OABI_COMPAT)) + default y if SECURITY_SELINUX + help + Enable low-overhead system-call auditing infrastructure that + can be used independently or with another kernel subsystem, + such as SELinux. + +config AUDIT_WATCH + def_bool y + depends on AUDITSYSCALL + select FSNOTIFY + +config AUDIT_TREE + def_bool y + depends on AUDITSYSCALL + select FSNOTIFY + +config AUDIT_LOGINUID_IMMUTABLE + bool "Make audit loginuid immutable" + depends on AUDIT + help + The config option toggles if a task setting its loginuid requires + CAP_SYS_AUDITCONTROL or if that task should require no special permissions + but should instead only allow setting its loginuid if it was never + previously set. On systems which use systemd or a similar central + process to restart login services this should be set to true. On older + systems in which an admin would typically have to directly stop and + start processes this should be set to false. Setting this to true allows + one to drop potentially dangerous capabilites from the login tasks, + but may not be backwards compatible with older init systems. + +source "kernel/irq/Kconfig" +source "kernel/time/Kconfig" + +menu "CPU/Task time and stats accounting" + config VIRT_CPU_ACCOUNTING bool "Deterministic task and CPU time accounting" depends on HAVE_VIRT_CPU_ACCOUNTING
@@ -305,18 +364,6 @@ config BSD_PROCESS_ACCT_V3 for processing it. A preliminary version of these tools is available at <http://www.gnu.org/software/acct/>. -config FHANDLE - bool "open by fhandle syscalls" - select EXPORTFS - help - If you say Y here, a user level program will be able to map - file names to handle and then later use the handle for - different file system operations. This is useful in implementing - userspace file servers, which now track files using handles instead - of names. The handle would remain the same even if file names - get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2) - syscalls. - config TASKSTATS bool "Export task/process statistics through netlink (EXPERIMENTAL)" depends on NET
@@ -359,50 +406,7 @@ config TASK_IO_ACCOUNTING Say N if unsure. -config AUDIT - bool "Auditing support" - depends on NET - help - Enable auditing infrastructure that can be used with another - kernel subsystem, such as SELinux (which requires this for - logging of avc messages output). Does not do system-call - auditing without CONFIG_AUDITSYSCALL. - -config AUDITSYSCALL - bool "Enable system-call auditing support" - depends on AUDIT && (X86 || PPC || S390 || IA64 || UML || SPARC64 || SUPERH || (ARM && AEABI && !OABI_COMPAT)) - default y if SECURITY_SELINUX - help - Enable low-overhead system-call auditing infrastructure that - can be used independently or with another kernel subsystem, - such as SELinux. - -config AUDIT_WATCH - def_bool y - depends on AUDITSYSCALL - select FSNOTIFY - -config AUDIT_TREE - def_bool y - depends on AUDITSYSCALL - select FSNOTIFY - -config AUDIT_LOGINUID_IMMUTABLE - bool "Make audit loginuid immutable" - depends on AUDIT - help - The config option toggles if a task setting its loginuid requires - CAP_SYS_AUDITCONTROL or if that task should require no special permissions - but should instead only allow setting its loginuid if it was never - previously set. On systems which use systemd or a similar central - process to restart login services this should be set to true. On older - systems in which an admin would typically have to directly stop and - start processes this should be set to false. Setting this to true allows - one to drop potentially dangerous capabilites from the login tasks, - but may not be backwards compatible with older init systems. - -source "kernel/irq/Kconfig" -source "kernel/time/Kconfig" +endmenu # "CPU/Task time and stats accounting" menu "RCU Subsystem"
Signature · 1 line
1.7.5.4
PATCH 6/6 cputime: Make finegrained irqtime accounting generally available
In reply to Frederic WeisbeckerThere is no known reason for this option to be unavailable on other archs than x86. They just need to call enable_sched_clock_irqtime() if they have a sufficiently finegrained clock to make it working.
Move it to the general option and let the user choose between it and pure tick based or virtual cputime accounting.
Note that virtual cputime accounting already performs a finegrained irqtime accounting. CONFIG_IRQ_TIME_ACCOUNTING is a kind of middle ground between tick and virtual based accounting. So CONFIG_IRQ_TIME_ACCOUNTING and CONFIG_VIRT_CPU_ACCOUNTING are mutually exclusive choices.
--- arch/Kconfig | 6 ++++++ arch/x86/Kconfig | 12 +----------- init/Kconfig | 30 +++++++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 12 deletions(-)
arch/Kconfig +6 -0
@@ -284,4 +284,10 @@ config SECCOMP_FILTER config HAVE_VIRT_CPU_ACCOUNTING bool +config HAVE_IRQ_TIME_ACCOUNTING + bool + help + Archs need to ensure they use a high enough resolution clock to + support irq time accounting and then call enable_sched_clock_irqtime(). + source "kernel/gcov/Kconfig"
arch/x86/Kconfig +1 -11
@@ -97,6 +97,7 @@ config X86 select KTIME_SCALAR if X86_32 select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER + select HAVE_IRQ_TIME_ACCOUNTING config INSTRUCTION_DECODER def_bool (KPROBES || PERF_EVENTS || UPROBES)
@@ -796,17 +797,6 @@ config SCHED_MC making when dealing with multi-core CPU chips at a cost of slightly increased overhead in some places. If unsure say N here. -config IRQ_TIME_ACCOUNTING - bool "Fine granularity task level IRQ time accounting" - default n - ---help--- - Select this option to enable fine granularity task irq time - accounting. This is done by reading a timestamp on each - transitions between softirq and hardirq state, so there can be a - small performance impact. - - If in doubt, say N here. - source "kernel/Kconfig.preempt" config X86_UP_APIC
init/Kconfig +29 -1
@@ -326,10 +326,25 @@ source "kernel/time/Kconfig" menu "CPU/Task time and stats accounting" +choice + prompt "Cputime accounting" + default TICK_CPU_ACCOUNTING if !PPC64 + default VIRT_CPU_ACCOUNTING if PPC64 + +# Kind of a stub config for the pure tick based cputime accounting +config TICK_CPU_ACCOUNTING + bool "Simple tick based cputime accounting" + depends on !S390 + help + This is the basic tick based cputime accounting that maintains + statistics about user, system and idle time spent on per jiffies + granularity. + + If unsure, say Y. + config VIRT_CPU_ACCOUNTING bool "Deterministic task and CPU time accounting" depends on HAVE_VIRT_CPU_ACCOUNTING - default y if PPC64 help Select this option to enable more accurate task and CPU time accounting. This is done by reading a CPU counter on each
@@ -339,6 +354,19 @@ config VIRT_CPU_ACCOUNTING this also enables accounting of stolen time on logically-partitioned systems. +config IRQ_TIME_ACCOUNTING + bool "Fine granularity task level IRQ time accounting" + depends on HAVE_IRQ_TIME_ACCOUNTING + help + Select this option to enable fine granularity task irq time + accounting. This is done by reading a timestamp on each + transitions between softirq and hardirq state, so there can be a + small performance impact. + + If in doubt, say N here. + +endchoice + config BSD_PROCESS_ACCT bool "BSD Process Accounting" help
Signature · 1 line
1.7.5.4