Re: [PATCH 2/3] task: RCU protect tasks on the runqueue

From: Frederic Weisbecker
Date: Wed Sep 04 2019 - 10:22:10 EST


On Mon, Sep 02, 2019 at 11:52:01PM -0500, Eric W. Biederman wrote:
>
> In the ordinary case today the rcu grace period of a task comes when a
> task is reaped, well after the task has left the runqueue. This
> change guarantees that the rcu grace period always happens after a
> task has left the runqueue. As this is something that usaually happens
> today I do not expect any code correctness problems with this change.
> At most I anticipate timing challenges.

What do you consider as the reaping point here? If this is the call to
release_task(), it can happen way before the task forever leaves the runqueue.

Let alone the RCU call to delayed_put_task_struct() can happen way before
the target leaves the runqueue, either after autoreap or normal reaping.