lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130426153956.GB3860@linux.vnet.ibm.com>
Date:	Fri, 26 Apr 2013 08:39:56 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Christoph Lameter <cl@...ux.com>,
	Hakan Akkan <hakanakkan@...il.com>,
	Kevin Hilman <khilman@...aro.org>,
	Li Zhong <zhong@...ux.vnet.ibm.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 1/2] nohz: Select VIRT_CPU_ACCOUNTING_GEN from full
 dynticks config

On Fri, Apr 26, 2013 at 04:53:26PM +0200, Frederic Weisbecker wrote:
> Turn the full dynticks passive dependency on VIRT_CPU_ACCOUNTING_GEN
> to an active one.
> 
> The full dynticks Kconfig is currently hidden behind the full dynticks
> cputime accounting, which is an awkward and counter-intuitive layout:
> the user first has to select the dynticks cputime accounting in order
> to make the full dynticks feature to be visible.
> 
> We definetly want it the other way around. The usual way to perform
> this kind of active dependency is use "select" on the depended target.
> Now we can't use the Kconfig "select" instruction when the target is
> a "choice".
> 
> So this patch inspires on how the RCU subsystem Kconfig interact
> with its dependencies on SMP and PREEMPT: we make sure that cputime
> accounting can't propose another option than VIRT_CPU_ACCOUNTING_GEN
> when NO_HZ_FULL is selected by using the right "depends on" instruction
> for each cputime accounting choices.

Ah, putting it back onto VIRT_CPU_ACCOUNTING_GEN, cute!

> Reported-by: Ingo Molnar <mingo@...nel.org>
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Christoph Lameter <cl@...ux.com>
> Cc: Hakan Akkan <hakanakkan@...il.com>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Kevin Hilman <khilman@...aro.org>
> Cc: Li Zhong <zhong@...ux.vnet.ibm.com>
> Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> ---
>  init/Kconfig        |    8 ++++----
>  kernel/time/Kconfig |    4 +++-
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/init/Kconfig b/init/Kconfig
> index edc8132..572db53 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -306,7 +306,7 @@ choice
>  # 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
> +	depends on !S390 && !NO_HZ_FULL
>  	help
>  	  This is the basic tick based cputime accounting that maintains
>  	  statistics about user, system and idle time spent on per jiffies
> @@ -316,7 +316,7 @@ config TICK_CPU_ACCOUNTING
> 
>  config VIRT_CPU_ACCOUNTING_NATIVE
>  	bool "Deterministic task and CPU time accounting"
> -	depends on HAVE_VIRT_CPU_ACCOUNTING
> +	depends on HAVE_VIRT_CPU_ACCOUNTING && !NO_HZ_FULL
>  	select VIRT_CPU_ACCOUNTING
>  	help
>  	  Select this option to enable more accurate task and CPU time
> @@ -329,7 +329,7 @@ config VIRT_CPU_ACCOUNTING_NATIVE
> 
>  config VIRT_CPU_ACCOUNTING_GEN
>  	bool "Full dynticks CPU time accounting"
> -	depends on HAVE_CONTEXT_TRACKING && 64BIT
> +	depends on HAVE_CONTEXT_TRACKING && 64BIT && NO_HZ_FULL

Do you really want this change?  This prohibits VIRT_CPU_ACCOUNTING_GEN
unless NO_HZ_FULL, which means that it can no longer be used in situations
where it used to be usable.  My guess is that you want to leave this
particular line as it was.

							Thanx, Paul

>  	select VIRT_CPU_ACCOUNTING
>  	select CONTEXT_TRACKING
>  	help
> @@ -346,7 +346,7 @@ config VIRT_CPU_ACCOUNTING_GEN
> 
>  config IRQ_TIME_ACCOUNTING
>  	bool "Fine granularity task level IRQ time accounting"
> -	depends on HAVE_IRQ_TIME_ACCOUNTING
> +	depends on HAVE_IRQ_TIME_ACCOUNTING && !NO_HZ_FULL
>  	help
>  	  Select this option to enable fine granularity task irq time
>  	  accounting. This is done by reading a timestamp on each
> diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
> index 1ea2bba..a2ddd65 100644
> --- a/kernel/time/Kconfig
> +++ b/kernel/time/Kconfig
> @@ -104,11 +104,13 @@ config NO_HZ_FULL
>  	depends on SMP
>  	# RCU_USER_QS dependency
>  	depends on HAVE_CONTEXT_TRACKING
> -	depends on VIRT_CPU_ACCOUNTING_GEN
> +	# VIRT_CPU_ACCOUNTING_GEN dependency
> +	depends on 64BIT
>  	select NO_HZ_COMMON
>  	select RCU_USER_QS
>  	select RCU_NOCB_CPU
>  	select RCU_NOCB_CPU_ALL
> +	select VIRT_CPU_ACCOUNTING_GEN
>  	select CONTEXT_TRACKING_FORCE
>  	select IRQ_WORK
>  	help
> -- 
> 1.7.5.4
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ