Re: [Patch] restore the RCU callback to defer put_task_struct() Re: Problems with 2.6.17-rt8

Bill Huey
2006-08-11T08:46:20Z

On Fri, Aug 11, 2006 at 10:16:56AM +0200, Esben Nielsen wrote:
> On Thu, 10 Aug 2006, Bill Huey wrote:
...
> >This extends the mmdrop logic with desched_thread() to also handle
> >free_task() requests as well. I believe this address your concerns and
> >I'm open to review of this patch.

> Without applying the patch and only skimming it it looks like what Paul
> and I concluded :-)
>
> But is there really no generic way of defering this kind of thing? It
> looks like a hell of a lot work where a kind of "message" infrastructure
> could have solved it in a few lines.

You can composite it out of a generic kernel APIs to fake it or special
case these things so it behaves like a message. Doing it this way also
cleaned up the code a bit. Messaging also wouldn't have directly solved
the per-CPU aspects of this reaping, so this was the right facility to
use. The only question left in my mind is the proper choice of priority
for that thread.

Another note, the schedule() path is shorten by this as well since this
deallocation and reaping stuff (calling to the mm system) was done with
preemption turned off and inline to the child itself exiting. This patch
should help shorted the maximal schedule path. It's one of the last
remining long paths like this in the kernel. It seems to be an all
around win if I'm not mistaken.

bill