Re: [PATCH v3 tip/core/rcu 1/9] rcu: Add call_rcu_tasks()

Oleg Nesterov
2014-08-04T13:28:10Z

On 08/03, Paul E. McKenney wrote:
>
> On Mon, Aug 04, 2014 at 08:37:37AM +0800, Lai Jiangshan wrote:
> > An alternative solution:
> > srcu_read_lock() before exit_notify(), srcu_read_unlock() after the last preempt_disable()
> > in the do_exit, and synchronize_srcu() in rcu_tasks_kthread().
>
> That is a good way to synchronize with the exiting tasks, and I will
> probably that that approach.
>
> I -thought- that Oleg was concerned about safely building the list to
> start with, though.

But for_each_process_thread() under rcu_read_lock() should work except
it can miss the exiting tasks.

So it seems that the clever Lai's trick should solve the problem.

Oleg.