On Thu, Feb 09, 2012 at 03:41:45PM -0800, Paul E. McKenney wrote: > On Thu, Feb 09, 2012 at 07:22:19PM +0100, Frederic Weisbecker wrote: > > On Thu, Feb 09, 2012 at 06:05:07PM +0200, Avi Kivity wrote: > > > On 02/09/2012 05:22 PM, Frederic Weisbecker wrote: > > > > > > > > > > > > Looks like there are new rcu_user_enter() and rcu_user_exit() APIs which > > > > > > we can use. Hopefully they subsume rcu_virt_note_context_switch() so we > > > > > > only need one set of APIs. > > > > > > > > > > Now that you mention it, that is a good goal. However, it requires > > > > > coordination with Frederic's code as well, so some investigation > > > > > is required. Bad things happen if you tell RCU you are idle when you > > > > > really are not and vice versa! > > > > > > > > > > Thanx, Paul > > > > > > > > > > > > > Right. Avi I need to know more about what you need. rcu_virt_note_context_switch() > > > > notes a quiescent state while rcu_user_enter() shuts down RCU (it's in fact the same > > > > thing than rcu_idle_enter() minus the is_idle_cpu() checks). > > > > > > I don't know enough about RCU to say if it's okay or not (I typically > > > peek at the quick quiz answers). However, switching to guest mode is > > > very similar to exiting to user mode: we're guaranteed not to be in an > > > rcu critical section, and to remain so until the guest exits back to > > > us. > > > > Awesome! > > > > > What guarantees does rcu_user_enter() provide? With luck guest > > > entry satisifies them all. > > > > So rcu_user_enter() puts the CPU into RCU idle mode, which means the CPU > > won't need to be part of the global RCU grace period completion. This > > prevents it to depend on the timer tick (although for now you keep it) > > and to complete some RCU specific work during the tick. > > > > Paul, do you think that would be a win? > > As long as the code doesn't enter RCU read-side critical sections in > the time between rcu_idle_enter() and rcu_idle_exit(), this should > work fine. This should work fine yeah but further the correctness, I wonder if this is going to be a win. We use rcu_idle_enter() in idle to avoid to keep the tick for RCU. But what about falling into guest mode? I guess the tick is kept there so is it going to be a win in throughput or something to use rcu_idle_enter()? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>