On Fri, Oct 05, 2007 at 08:24:21AM -0400, Steven Rostedt wrote:
Thanks!
But I'm still trying to understand why the (increment + masking)
is required at all.
The thread(producer) that requires boosting is added to the element
with index rcu_boost_idx.
The booster thread(consumer) increments the rcu_boost_idx to
(rcu_boost_idx + 1) % RCU_BOOST_ELEMENTS, before it fetches the least
recently used rcu_boot_dat elements and boost the eligible tasks queued
in that element.
So, can't we just return per_cpu(rcu_boost_dat, cpu)[rcu_boost_idx] from
rcu_rbd_boosting(cpu) ? Isn't that already the least recently used
element?
Thanks and Regards
gautham.
--
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
-