[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060921081333.GC11644@gnuppy.monkey.org>
Date: Thu, 21 Sep 2006 01:13:33 -0700
From: Bill Huey (hui) <billh@...ppy.monkey.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
John Stultz <johnstul@...ibm.com>,
"Paul E. McKenney" <paulmck@...ibm.com>,
Dipankar Sarma <dipankar@...ibm.com>,
Arjan van de Ven <arjan@...radead.org>,
Esben Nielsen <simlo@...s.au.dk>,
"Bill Huey (hui)" <billh@...ppy.monkey.org>
Subject: Re: [PATCH] move put_task_struct() reaping into a thread [Re: 2.6.18-rt1]
On Thu, Sep 21, 2006 at 09:56:33AM +0200, Ingo Molnar wrote:
> * Bill Huey <billh@...ppy.monkey.org> wrote:
>
> > [...] If the upstream kernel used RCU function in a task allocation or
> > task struct reading in the first place then call_rcu() would be a
> > clear choice. However, I didn't see it used in that way (I could be
> > wrong) [...]
>
> it was RCU-ified briefly but then it was further improved to direct
> freeing, because upstream _can_ free it directly.
Unfortunately, this is a problem with -rt patch and the lock ordering
in this system when you have to call a memory allocator within an atomic
critical section. I fully accept this as part of what goes into making a
kernel preemptive and I'm ok with it. Not many folks know about the
special case locking rules in the -rt kernel so this might be new to
various folks.
If you're looking for validation of this technique from me and an ego
stroking, then you have it from me. :)
Fortunately, it's in a non-critical place so this should *not* be too
much of a problem, but I've already encountered oddies trying to
allocate a pool of entities for populating a free list under an atomic
critical section of some sort for some code I've been writing. This is
a significant problem with kernel coding in -rt, but I can't say what
the general solution is other than making the memory allocators
non-preemptible by reverting the locks back to raw spinlocks, etc...
using lock-break, who knows. I'm ok with the current scenario, but this
could eventually be a larger problem.
bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists