Messages in this thread |  | | Date | Sat, 14 Jan 2023 09:35:40 -0800 | From | "Paul E. McKenney" <> | Subject | Re: Internal vs. external barriers (was: Re: Interesting LKMM litmus test) |
| |
On Sat, Jan 14, 2023 at 11:55:17AM -0500, Alan Stern wrote: > On Fri, Jan 13, 2023 at 12:07:06PM -0800, Paul E. McKenney wrote: > > What Alan said! You could even have distinct partially overlapping > > grace periods, as the Linux kernel actually does have courtesy of normal > > grace periods via synchronize_rcu() and expedited grace periods via > > synchronize_rcu_expedited(). > > Or just two different CPUs making overlapping calls to > synchronize_rcu().
True, there could be two overlapping grace periods in that case. If nothing else, one of those synchronize_rcu() calls could be preempted for 500 milliseconds upon entry, thus overlapping many grace periods from the viewpoint of the user. Which is the viewpoint that LKMM should of course take.
But because I had just been digging in the internals, I was taking an implemntation-centric viewpoint. From that viewpoint, there is at most one normal grace period in flight at a time. But even from that viewpoint, there can also be a single independent expedited grace period in flight at any given point in time, so partial overlap can happen even from an implementation-centric viewpoint.
Which in no way negates or weakens your point, just letting you guys know where I was coming from. Because if things go as they normally do, there will be a future discussion where my head will once again be deep into the implementation. ;-)
Thanx, Paul
|  |