Re: [rfc] "fair" rw spinlocks

Eric W. Biederman
2009-12-10T10:31:56Z

"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> writes:

> My main concern would be "fork storms", where each CPU in a large
> system is spawning children in a pgrp that some other CPU is attempting
> to kill. The CPUs spawning children might be able to keep ahead of
> the single CPU, so that the pgrp never is completely killed.
>
> Enlisting the aid of the CPUs doing the spawning (e.g., by having them
> consult a list of signals being sent) prevents this fork-storm scenario.

We almost have a worst case bound. We can have at most max_thread
processes. Unfortunately it appears we don't force an rcu grace
period anywhere. So It does appear theoretically possible to fork and
exit on a bunch of other cpus infinitely extending the rcu interval.

Still that is all inside the tasklist_lock, which serializes all of those
other cpus. So as long as the cost of queuing signals is less than the
cost of adding processes to the task lists we won't have a problem.

Eric