lkml.org 
[lkml]   [2009]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 2/4] rcu: enable fourth level of TREE_RCU hierarchy
On Wed, Dec 02, 2009 at 03:25:42PM -0800, Josh Triplett wrote:
> On Wed, Dec 02, 2009 at 12:10:14PM -0800, Paul E. McKenney wrote:
> > From: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> >
> > Enable a fourth level of rcu_node hierarchy for TREE_RCU and
> > TREE_PREEMPT_RCU. This is for stress-testing and experiemental
> > purposes only, although in theory this would enable 16,777,216 CPUs
> > on 64-bit systems, though only 1,048,576 CPUs on 32-bit systems.
> > Normal experimental use of this fourth level will normally set
> > CONFIG_RCU_FANOUT=2, requiring a 16-CPU system, though the more
> > adventurous (and more fortunate) experimenters may wish to chose
> > CONFIG_RCU_FANOUT=3 for 81-CPU systems or even CONFIG_RCU_FANOUT=4 for
> > 256-CPU systems.
> >
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
>
> I like this idea in general, but I have one suggestion on your boot-up
> message:
>
> > --- a/kernel/rcutree.c
> > +++ b/kernel/rcutree.c
> [...]
> > @@ -1877,6 +1878,9 @@ void __init rcu_init(void)
> > #ifdef CONFIG_RCU_CPU_STALL_DETECTOR
> > printk(KERN_INFO "RCU-based detection of stalled CPUs is enabled.\n");
> > #endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
> > +#if NUM_RCU_LVL_4 != 0
> > + printk(KERN_INFO "Experimental four-level hierarchy is enabled.\n");
> > +#endif /* #if NUM_RCU_LVL_4 != 0 */
>
> Rather than printing a message when people use the four-level hierarchy,
> how about just printing a message any time someone has set
> CONFIG_RCU_FANOUT manually rather than automatically, and including
> NR_CPUS in that message? That should only occur when testing or when
> trying to do NUMA optimization, and either way it seems worth noting.

Good point! I will keep this patch as is, but I like the idea of having
RCU note anything unusual at boot time, and so have added this to my
todo list. Of course, if CONFIG_RCU_FANOUT starts getting set low as a
matter of course for any (good) reason, then the definition of "anything
unusual" would change, and hence the code would also change.

> Either way the change seems fine to me. With or without that suggested
> change:
>
> Acked-by: Josh Triplett <josh@joshtriplett.org>

Thank you!

Thanx, Paul


\
 
 \ /
  Last update: 2009-12-03 01:23    [W:0.501 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site