Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750966AbWIUIN5 (ORCPT ); Thu, 21 Sep 2006 04:13:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751045AbWIUIN5 (ORCPT ); Thu, 21 Sep 2006 04:13:57 -0400 Received: from adsl-69-232-92-238.dsl.sndg02.pacbell.net ([69.232.92.238]:50850 "EHLO gnuppy.monkey.org") by vger.kernel.org with ESMTP id S1750966AbWIUIN4 (ORCPT ); Thu, 21 Sep 2006 04:13:56 -0400 Date: Thu, 21 Sep 2006 01:13:33 -0700 To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , John Stultz , "Paul E. McKenney" , Dipankar Sarma , Arjan van de Ven , Esben Nielsen , "Bill Huey (hui)" Subject: Re: [PATCH] move put_task_struct() reaping into a thread [Re: 2.6.18-rt1] Message-ID: <20060921081333.GC11644@gnuppy.monkey.org> References: <20060920141907.GA30765@elte.hu> <20060921065624.GA9841@gnuppy.monkey.org> <20060921065402.GA22089@elte.hu> <20060921071838.GA10337@gnuppy.monkey.org> <20060921071624.GA25281@elte.hu> <20060921073222.GC10337@gnuppy.monkey.org> <20060921072908.GA27280@elte.hu> <20060921074805.GA11644@gnuppy.monkey.org> <20060921075633.GA30343@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060921075633.GA30343@elte.hu> User-Agent: Mutt/1.5.13 (2006-08-11) From: Bill Huey (hui) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1795 Lines: 38 On Thu, Sep 21, 2006 at 09:56:33AM +0200, Ingo Molnar wrote: > * Bill Huey 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/