Re: [PATCH, RFC, tip/core/rcu] scalable classic RCU implementation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Manfred Spraul
Date: Sunday, August 24, 2008 - 1:08 am

Paul E. McKenney wrote:
I'm not sure if a bitmap is the right storage. If I understand the code 
correctly, it contains two information:
1) If the bitmap is clear, then all cpus have completed whatever they 
need to do.
A counter is more efficient than a bitmap. Especially: It would allow to 
choose the optimal fan-out, independent from 32/64 bits.
2) The information if the current cpu must do something to complete the 
current period.non
This is a local information, usually (always?) only the current cpu 
needs to know if it must do something.
But this doesn't need to be stored in a shared structure, the 
information could be stored in a per-cpu structure.

Do you have a description of the events between call_rcu() and the rcu 
callback?
Is the following description correct?

__call_rcu() queues in RCU_NEXT_TAIL.
In the middle of the current grace period: rcu_check_quiescent_state() 
calls rcu_next_callbacks_are_ready().
Entry now in RCU_NEXT_READY_TAIL
** 0.5 cycles: wait until all cpus have completed the current cycle.
rcu_process_gp_end() moves from NEXT_READY_TAIL to WAIT_TAIL

** full grace period
rcu_process_gp_end() moves from WAIT_TAIL to DONE_TAIL
rcu_do_batch() finds the entries in DONE_TAIL and calls the callback.


Why this mb()? There was a grace period between the last read side 
critical section that might have accessed the pointer.
The rcu internal code already does spin_lock()+spin_unlock(). Isn't that 
sufficient?

Have you considered merging RCU_DONE_TAIL for rcu_data and rcu_bh_data?

The docbook entry is duplicated: They are in include/linux/rcupdate.h 
and here.
What about removing one of them?
I would go one step further:
Even add call_rcu_sched() into rcupdate.h. Add a Kconfig bool 
"RCU_NEEDS_SCHED" and automatically define either the extern or the #define.

--
    Manfred
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH, RFC, tip/core/rcu] scalable classic RCU implem ..., Paul E. McKenney, (Fri Aug 22, 10:22 am)
Re: [PATCH, RFC, tip/core/rcu] scalable classic RCU implem ..., Manfred Spraul, (Sun Aug 24, 1:08 am)
Re: [PATCH, RFC, tip/core/rcu] scalable classic RCU implem ..., Paul E. McKenney, (Wed Aug 27, 11:28 am)
Re: [PATCH, RFC, tip/core/rcu] scalable classic RCU implem ..., Paul E. McKenney, (Wed Aug 27, 11:34 am)
Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU imp ..., Paul E. McKenney, (Sat Aug 30, 12:38 pm)
Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU imp ..., Paul E. McKenney, (Sun Aug 31, 10:20 am)
Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU imp ..., Paul E. McKenney, (Sun Aug 31, 10:55 am)
Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU imp ..., Paul E. McKenney, (Sun Aug 31, 12:23 pm)
[PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Fri Sep 5, 8:29 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Andrew Morton, (Fri Sep 5, 12:33 pm)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Fri Sep 5, 4:04 pm)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Andrew Morton, (Fri Sep 5, 4:52 pm)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Fri Sep 5, 9:16 pm)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Manfred Spraul, (Sat Sep 6, 9:37 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Sun Sep 7, 10:25 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Mon Sep 15, 9:02 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Manfred Spraul, (Tue Sep 16, 9:52 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Tue Sep 16, 10:30 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Manfred Spraul, (Tue Sep 16, 10:48 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Tue Sep 16, 11:22 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Manfred Spraul, (Sun Sep 21, 4:09 am)
Re: [PATCH, RFC] v4 scalable classic RCU implementation, Paul E. McKenney, (Sun Sep 21, 2:14 pm)
[PATCH, RFC] v6 scalable classic RCU implementation, Paul E. McKenney, (Tue Sep 23, 4:53 pm)
Re: [PATCH, RFC] v6 scalable classic RCU implementation, Ingo Molnar, (Thu Sep 25, 12:26 am)
Re: [PATCH, RFC] v6 scalable classic RCU implementation, Ingo Molnar, (Thu Sep 25, 12:29 am)
Re: [PATCH, RFC] v6 scalable classic RCU implementation, Paul E. McKenney, (Thu Sep 25, 7:05 am)
Re: [PATCH, RFC] v6 scalable classic RCU implementation, Paul E. McKenney, (Thu Sep 25, 7:18 am)
[PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Fri Oct 10, 9:09 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Sun Oct 12, 8:52 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Sun Oct 12, 3:46 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Mon Oct 13, 11:03 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Tue Oct 14, 6:11 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Wed Oct 15, 1:13 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Wed Oct 15, 8:26 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Gautham R Shenoy, (Fri Oct 17, 1:34 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Gautham R Shenoy, (Fri Oct 17, 8:35 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Fri Oct 17, 8:43 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Fri Oct 17, 8:46 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Wed Oct 22, 11:41 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Wed Oct 22, 2:02 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Wed Oct 22, 2:24 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Mon Oct 27, 9:45 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Mon Oct 27, 12:48 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Mon Oct 27, 4:52 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Mon Oct 27, 10:30 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Tue Oct 28, 8:17 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Tue Oct 28, 10:21 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Tue Oct 28, 10:35 am)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Sun Nov 2, 1:10 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Mon Nov 3, 1:33 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Manfred Spraul, (Wed Nov 5, 12:48 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Wed Nov 5, 2:27 pm)
[PATCH, RFC] v8 scalable classic RCU implementation, Paul E. McKenney, (Sat Nov 15, 4:20 pm)
Re: [PATCH, RFC] v7 scalable classic RCU implementation, Paul E. McKenney, (Mon Dec 8, 11:42 am)