[lkml]   [2008]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject__get_cpu_var() called from a preempt-unsafe context in __rcu_preempt_unboost() ?
Hi Paul, Steve,  

This is with reference to the preemptible rcu implementation in

In __rcu_read_unlock(), we call __rcu_preempt_unboost() to unboost a
task's priority which had been bumped up when it was preempted out
while the rcu_read section.

The code path is as follows

|--> local_irq_restore(oldirq);
|--> __rcu_preempt_unboost();
|--> rcu_trace_boost_unboost_called(RCU_BOOST_ME)

where RCU_BOOST_ME is #defined as &__get_cpu_var(rcu_boost_data).

Is calling __get_cpu_var() safe in this context, since we've already
enabled the local interrupts and we're not in a preempt_disabled() ?

Thanks and Regards

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

 \ /
  Last update: 2008-01-04 13:13    [W:0.103 / U:0.820 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site