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: <56D77AB7.4090902@csail.mit.edu>
Date:	Wed, 2 Mar 2016 18:43:51 -0500
From:	"Srivatsa S. Bhat" <srivatsa@...il.mit.edu>
To:	tj@...nel.org, akpm@...ux-foundation.org, rusty@...tcorp.com.au,
	linux-kernel@...r.kernel.org, rostedt@...dmis.org,
	paulmck@...ux.vnet.ibm.com, peterz@...radead.org, mingo@...nel.org,
	arjan@...ux.intel.com, tglx@...utronix.de,
	rafael.j.wysocki@...el.com, pjt@...gle.com, riel@...hat.com,
	bigeasy@...utronix.de, oleg@...hat.com,
	torvalds@...ux-foundation.org, srivatsa@....edu, hpa@...or.com,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:smp/hotplug] cpu/hotplug: Restructure FROZEN state handling

On 3/1/16 2:51 PM, tip-bot for Thomas Gleixner wrote:
> Commit-ID:  090e77c391dd983c8945b8e2e16d09f378d2e334
> Gitweb:     http://git.kernel.org/tip/090e77c391dd983c8945b8e2e16d09f378d2e334
> Author:     Thomas Gleixner <tglx@...utronix.de>
> AuthorDate: Fri, 26 Feb 2016 18:43:23 +0000
> Committer:  Thomas Gleixner <tglx@...utronix.de>
> CommitDate: Tue, 1 Mar 2016 20:36:53 +0100
> 
> cpu/hotplug: Restructure FROZEN state handling
> 
> There are only a few callbacks which really care about FROZEN
> vs. !FROZEN. No need to have extra states for this.
> 
> Publish the frozen state in an extra variable which is updated under
> the hotplug lock and let the users interested deal with it w/o
> imposing that extra state checks on everyone.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: linux-arch@...r.kernel.org
> Cc: Rik van Riel <riel@...hat.com>
> Cc: Rafael Wysocki <rafael.j.wysocki@...el.com>
> Cc: "Srivatsa S. Bhat" <srivatsa@....edu>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Arjan van de Ven <arjan@...ux.intel.com>
> Cc: Sebastian Siewior <bigeasy@...utronix.de>
> Cc: Rusty Russell <rusty@...tcorp.com.au>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Oleg Nesterov <oleg@...hat.com>
> Cc: Tejun Heo <tj@...nel.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Paul McKenney <paulmck@...ux.vnet.ibm.com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: Paul Turner <pjt@...gle.com>
> Link: http://lkml.kernel.org/r/20160226182340.334912357@linutronix.de
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  include/linux/cpu.h |  2 ++
>  kernel/cpu.c        | 69 ++++++++++++++++++++++-------------------------------
>  2 files changed, 31 insertions(+), 40 deletions(-)
> 
> diff --git a/include/linux/cpu.h b/include/linux/cpu.h
> index d2ca8c3..f2fb549 100644
> --- a/include/linux/cpu.h
> +++ b/include/linux/cpu.h
> @@ -118,6 +118,7 @@ enum {
>  
>  
>  #ifdef CONFIG_SMP
> +extern bool cpuhp_tasks_frozen;
>  /* Need to know about CPUs going up/down? */
>  #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE)
>  #define cpu_notifier(fn, pri) {					\
> @@ -177,6 +178,7 @@ extern void cpu_maps_update_done(void);
>  #define cpu_notifier_register_done	cpu_maps_update_done
>  
>  #else	/* CONFIG_SMP */
> +#define cpuhp_tasks_frozen	0
>  
>  #define cpu_notifier(fn, pri)	do { (void)(fn); } while (0)
>  #define __cpu_notifier(fn, pri)	do { (void)(fn); } while (0)
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 5b9d396..41a6cb8 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -29,6 +29,8 @@
>  #ifdef CONFIG_SMP
>  /* Serializes the updates to cpu_online_mask, cpu_present_mask */
>  static DEFINE_MUTEX(cpu_add_remove_lock);
> +bool cpuhp_tasks_frozen;
> +EXPORT_SYMBOL_GPL(cpuhp_tasks_frozen);
>  

One small nitpick though: we don't need to export this symbol yet; it can
be deferred until the callbacks that need it are actually modified to use
this value (presumably in a later patchset).

Regards,
Srivatsa S. Bhat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ