Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1196137

Re: [PATCH tip/core/rcu 02/12] rcu: Panic if RCU tree can not accommodate all CPUs

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH tip/core/rcu 02/12] rcu: Panic if RCU tree can not accommodate all CPUs
Date 2015-07-30 17:40 +0200
Message-ID <pRY66-2v3-17@gated-at.bofh.it> (permalink)
References (1 earlier) <pNmsq-2cc-7@gated-at.bofh.it> <pNmsr-2cc-39@gated-at.bofh.it> <pRV8f-6DP-15@gated-at.bofh.it> <pRXWq-2jR-3@gated-at.bofh.it> <pRY65-2v3-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 30, 2015 at 05:32:51PM +0200, Peter Zijlstra wrote:
> On Thu, Jul 30, 2015 at 08:25:17AM -0700, Paul E. McKenney wrote:
> > On Thu, Jul 30, 2015 at 02:28:35PM +0200, Peter Zijlstra wrote:
> > > On Fri, Jul 17, 2015 at 03:30:53PM -0700, Paul E. McKenney wrote:
> > > > +	if (n > rcu_capacity[MAX_RCU_LVLS])
> > > > +		panic("rcu_init_geometry: rcu_capacity[] is too small");
> > > 
> > > How can this ever happen? We _know_ NR_CPUS at compile time, there's no
> > > way we can get more CPUs than that -- even if the hardware has more,
> > > we'll stop enumerating.
> > 
> > You can make this happen by building with CONFIG_RCU_FANOUT=2 and
> > CONFIG_RCU_FANOUT_LEAF=2, then running on a system with more than 16 CPUs.
> > The kernel boot parameter rcutree.rcu_fanout_leaf=2 can be substituted for
> > CONFIG_RCU_FANOUT_LEAF=2, hence the need for a runtime test.  I do this
> > sort of thing for my rcutorture testing in order to test a four-level
> > rcu_node tree with only 16 CPUs.
> 
> How about we make the build fail if NR_CPUS exceeds that maximum fanout?

Or better yet, auto-select these numbers based on NR_CPUS and remove the
configs.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH tip/core/rcu 02/12] rcu: Panic if RCU tree can not  accommodate all CPUs "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-07-30 17:30 +0200
  Re: [PATCH tip/core/rcu 02/12] rcu: Panic if RCU tree can not  accommodate all CPUs Peter Zijlstra <peterz@infradead.org> - 2015-07-30 17:40 +0200
    Re: [PATCH tip/core/rcu 02/12] rcu: Panic if RCU tree can not  accommodate all CPUs Peter Zijlstra <peterz@infradead.org> - 2015-07-30 17:40 +0200
    Re: [PATCH tip/core/rcu 02/12] rcu: Panic if RCU tree can not  accommodate all CPUs "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-07-30 18:00 +0200
      Re: [PATCH tip/core/rcu 02/12] rcu: Panic if RCU tree can not  accommodate all CPUs "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-07-31 18:00 +0200

csiph-web