Re: [PATCH] move put_task_struct() reaping into a thread [Re: 2.6.18-rt1]

Ingo Molnar
2006-09-21T07:37:47Z

* Bill Huey <billh@gnuppy.monkey.org> wrote:

> > but it _is_ already being reaped in another thread: softirq-rcu.
> > Splitting that up any further will only fragment the
> > context-switching and increases cache footprint - it wont (or
> > rather, shouldnt) have any functional effect. (As a sidenote, i'm
> > considering the unification of all 'same default priority' softirq
> > threads into a single thread per CPU, to further reduce this cost of
> > 'spreadout'.)
>
> I overloaded another reaping thread that was doing largely similar
> functionality in that it was also reaping, so I don't think it's that
> bad. I did it from a cleanliness point of view with the code tree.
> It's the "desched_thread" in fork.c that I'm using. It seems to be the
> right thing to do. I'm sure Esben will follow up on this.

the reason why i added desched_thread was not because it's "more right"
to do this from a separate context, but simply because the resource
freed by it is not being freed via RCU by the upstream kernel. If that
resource (mm_struct) were freed by RCU we'd have its rt-friendly
reapdown "for free" and no desched_thread would be needed at all.

Ingo