On Fri, 5 Oct 2007, Gautham R Shenoy wrote:
> On Mon, Sep 10, 2007 at 11:39:01AM -0700, Paul E. McKenney wrote:
>
> [snip]
>
> > +
> > +/*
> > + * Return the list from which to boost target tasks.
> > + * May only be invoked by the booster task, so guaranteed to
> > + * already be initialized. Use rcu_boost_dat element least recently
> > + * the destination for task blocking in RCU read-side critical sections.
> > + */
> > +static inline struct rcu_boost_dat *rcu_rbd_boosting(int cpu)
> > +{
> > + int idx = (rcu_boost_idx + 1) & (RCU_BOOST_ELEMENTS - 1);
>
> Why is this masking required? When we increment
> the rcu_boost_idx in rcu_booster, we do perform a modulo operation
> to ensure that it wraps around RCU_BOOST_ELEMENTS.
Because we are not masking rcu_boost_idx, we are masking
(rcu_boost_idx + 1) which may extend the bounderies of
RCU_BOOST_ELEMENTS.
-- Steve
-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
- Re: [PATCH RFC 3/9] RCU: Preemp... Paul E. McKenney
- [PATCH RFC 4/9] RCU: synchronize_sched() workaround for C... Paul E. McKenney
- [PATCH RFC 5/9] RCU: CPU hotplug support for preemptible ... Paul E. McKenney
- Re: [PATCH RFC 5/9] RCU: CPU hotplug support for pre... Oleg Nesterov
- Re: [PATCH RFC 5/9] RCU: CPU hotplug support for... Paul E. McKenney
- [PATCH RFC 6/9] RCU priority boosting for preemptible RCU Paul E. McKenney
- Re: [PATCH RFC 6/9] RCU priority boosting for preemp... Gautham R Shenoy
- Re: [PATCH RFC 6/9] RCU priority boosting for pr... Steven Rostedt
- Re: [PATCH RFC 6/9] RCU priority boosting fo... Paul E. McKenney
- Re: [PATCH RFC 6/9] RCU priority boosting for preemp... Gautham R Shenoy
- Re: [PATCH RFC 6/9] RCU priority boosting for pr... Steven Rostedt
- Re: [PATCH RFC 6/9] RCU priority boosting fo... Gautham R Shenoy
- Re: [PATCH RFC 6/9] RCU priority boostin... Paul E. McKenney
- [PATCH RFC 7/9] RCU: rcutorture testing for RCU priority ... Paul E. McKenney
- [PATCH RFC 8/9] RCU: Make RCU priority boosting consume l... Paul E. McKenney
- [PATCH RFC 9/9] RCU: preemptible documentation and commen... Paul E. McKenney
- Re: [PATCH RFC 0/9] RCU: Preemptible RCU Ingo Molnar
