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]
Date:	Wed, 23 Jul 2014 06:42:13 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Pranith Kumar <bobby.prani@...il.com>
Cc:	Josh Triplett <josh@...htriplett.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	"open list:READ-COPY UPDATE..." <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 15/16] rcu: Check for a nocb cpu before trying to spawn
 nocb threads

On Wed, Jul 23, 2014 at 09:14:51AM -0400, Pranith Kumar wrote:
> On Wed, Jul 23, 2014 at 8:28 AM, Paul E. McKenney
> <paulmck@...ux.vnet.ibm.com> wrote:
> > On Wed, Jul 23, 2014 at 01:09:52AM -0400, Pranith Kumar wrote:
> >> This commit tries to spawn nocb kthreads only when the CPU is marked as a nocb
> >> cpu. This is a minor optimization.
> >>
> >> Signed-off-by: Pranith Kumar <bobby.prani@...il.com>
> >
> > This only happens once at boot time, so I am happier with the single check
> > at the bottom.  So sorry, but no.
> 
> Actually this happens whenever a CPU is coming online, but yes, it is
> a minor optimization for hotplug.

Fair point, but still.

                                                        Thanx, Paul

> >> ---
> >>  kernel/rcu/tree_plugin.h | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> >> index 541c776..8abff0a 100644
> >> --- a/kernel/rcu/tree_plugin.h
> >> +++ b/kernel/rcu/tree_plugin.h
> >> @@ -1490,7 +1490,8 @@ static void rcu_prepare_kthreads(int cpu)
> >>               return;
> >>
> >>       rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
> >> -     rcu_spawn_all_nocb_kthreads(cpu);
> >> +     if (rcu_is_nocb_cpu(cpu))
> >> +             rcu_spawn_all_nocb_kthreads(cpu);
> >>  }
> >>
> >>  #else /* #ifdef CONFIG_RCU_BOOST */
> >> --
> >> 2.0.0.rc2
> >>
> >
> 
> 
> 
> -- 
> Pranith
> 

--
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