Messages in this thread | | | Date | Mon, 7 Jan 2013 16:47:31 +0100 | Subject | Re: [PATCH 03/27] cputime: Allow dynamic switch between tick/virtual based cputime accounting | From | Frederic Weisbecker <> |
| |
Hey Paul,
2013/1/4 Paul Gortmaker <paul.gortmaker@windriver.com>: > On 12-12-29 11:42 AM, Frederic Weisbecker wrote: >> Allow to dynamically switch between tick and virtual based cputime accounting. >> This way we can provide a kind of "on-demand" virtual based cputime >> accounting. In this mode, the kernel will rely on the user hooks >> subsystem to dynamically hook on kernel boundaries. >> >> This is in preparation for beeing able to stop the timer tick further >> idle. Doing so will depend on CONFIG_VIRT_CPU_ACCOUNTING which makes > > s/beeing/being/ -- also I know what you mean, but it may not be > 100% clear to everyone -- perhaps "...for being able to stop the > timer tick in more places than just the idle state."
Thanks! Fixed for the next version!
[...] >> +static inline bool vtime_accounting(void) { return false; } > > It wasn't 100% obvious what vtime_accounting() was doing until I > saw its definition below. I wonder if it should be something like > vtime_accounting_on() or vtime_accounting_enabled() instead?
Agreed, I've renamed into vtime_accounting_enabled().
> >> #endif >> >> #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN >> diff --git a/init/Kconfig b/init/Kconfig >> index dad2b88..307bc35 100644 >> --- a/init/Kconfig >> +++ b/init/Kconfig >> @@ -342,6 +342,7 @@ config VIRT_CPU_ACCOUNTING >> bool "Deterministic task and CPU time accounting" >> depends on HAVE_VIRT_CPU_ACCOUNTING || HAVE_CONTEXT_TRACKING >> select VIRT_CPU_ACCOUNTING_GEN if !HAVE_VIRT_CPU_ACCOUNTING >> + select VIRT_CPU_ACCOUNTING_NATIVE if HAVE_VIRT_CPU_ACCOUNTING >> help >> Select this option to enable more accurate task and CPU time >> accounting. This is done by reading a CPU counter on each >> @@ -366,11 +367,16 @@ endchoice >> >> config VIRT_CPU_ACCOUNTING_GEN >> select CONTEXT_TRACKING >> + depends on VIRT_CPU_ACCOUNTING && HAVE_CONTEXT_TRACKING > > Should the 2nd half of this depends been already here, i.e. introduced > with the prev. patch that created VIRT_CPU_ACCOUNTING_GEN?
Yeah, Li Zhong suggested that I turn *_GEN and *_NATIVE options into distinct choices for the user. So I moved that part to the previous patch.
Thanks!
| |