Re: [RFC] rcu: Prevent expedite reporting within RCU read-side section

From: Byungchul Park
Date: Fri Mar 09 2018 - 03:53:59 EST


On 3/9/2018 5:41 PM, Byungchul Park wrote:
On Thu, Mar 08, 2018 at 10:01:56AM -0800, Paul E. McKenney wrote:
On Thu, Mar 08, 2018 at 07:08:25PM +0900, Byungchul Park wrote:

[...]

2. Clear its bit of ->expmask *only* when it's out of RCU read
sections and keep others unchanged. So it will be cleared at the
end of the RCU read section in that case.

This option would also work because we anyway check both
->exp_tasks and ->expmask to finish the expedite-gp.

This could be made to work, but one shortcoming is that the grace
period would end up waiting on later read-side critical sections
that it does not really need to wait on. Also, eventually all the

I don't think it waits on any later ones since ->expmask would be
cleared at the end of the previous RCU read section.

Now having simplified my patch, with the simplified version, I can
see what you were saying. Right, the expedite-gp might be extended
as you said. That optimization cannot be achieved this way without
reggression.

You're awesome. Thank you for explaning the reason why not.

--
Thanks,
Byungchul