From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mtagate1.de.ibm.com (mtagate1.de.ibm.com [195.212.29.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mtagate1.de.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 015D8DDF00 for ; Tue, 24 Apr 2007 17:44:05 +1000 (EST) Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.8/8.13.8) with ESMTP id l3O7i18m028974 for ; Tue, 24 Apr 2007 07:44:01 GMT Received: from d12av01.megacenter.de.ibm.com (d12av01.megacenter.de.ibm.com [9.149.165.212]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l3O7i1kb3539056 for ; Tue, 24 Apr 2007 09:44:01 +0200 Received: from d12av01.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l3O7i0Nb009252 for ; Tue, 24 Apr 2007 09:44:01 +0200 Date: Tue, 24 Apr 2007 09:46:48 +0200 From: Cornelia Huck To: Benjamin Herrenschmidt Subject: Re: [PATCH] powerpc pseries eeh: Convert to kthread API Message-ID: <20070424094648.43d2b9b4@gondolin.boeblingen.de.ibm.com> In-Reply-To: <1177390842.14873.94.camel@localhost.localdomain> References: <11769695763104-git-send-email-ebiederm@xmission.com> <20070422123155.GF20763@infradead.org> <20070423205020.GR31947@austin.ibm.com> <1177378733.14873.52.camel@localhost.localdomain> <1177382544.14873.57.camel@localhost.localdomain> <1177390842.14873.94.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: ", linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , linuxppc-dev@ozlabs.org, Paul Mackerras , "Eric W. Biederman" , containers@lists.osdl.org, Oleg Nesterov List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 24 Apr 2007 15:00:42 +1000, Benjamin Herrenschmidt wrote: > Like anything else, modules should have separated the entrypoints for > > - Initiating a removal request > - Releasing the module > > The former is use did "rmmod", can unregister things from subsystems, > etc... (and can file if the driver decides to refuse removal requests > when it's busy doing things or whatever policy that module wants to > implement). > > The later is called when all references to the modules have been > dropped, it's a bit like the kref "release" (and could be implemented as > one). That sounds quite similar to the problems we have with kobject refcounting vs. module unloading. The patchset I posted at http://marc.info/?l=linux-kernel&m=117679014404994&w=2 exposes the refcount of the kobject embedded in the module. Maybe the kthread code could use that reference as well?