From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] powerpc pseries eeh: Convert to kthread API From: Benjamin Herrenschmidt In-Reply-To: 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> Content-Type: text/plain Date: Tue, 24 Apr 2007 15:00:42 +1000 Message-Id: <1177390842.14873.94.camel@localhost.localdomain> Mime-Version: 1.0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Archive: List-Post: To: "Eric W. Biederman" Cc: ", linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , linuxppc-dev@ozlabs.org, Paul Mackerras , containers@lists.osdl.org, Oleg Nesterov List-ID: > Further in general it doesn't make sense to grab a module reference > and call that sufficient because we would like to request that the > module exits. Which is, btw, I think a total misdesign of our module stuff, but heh, I remember that lead to some flamewars back then... 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). If we had done that (simple) thing back then, module refcounting would have been much less of a problem... I remember some reasons why that was veto'ed but I didn't and still don't agree. Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754575AbXDXFCE (ORCPT ); Tue, 24 Apr 2007 01:02:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161554AbXDXFCD (ORCPT ); Tue, 24 Apr 2007 01:02:03 -0400 Received: from gate.crashing.org ([63.228.1.57]:38596 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754573AbXDXFCB (ORCPT ); Tue, 24 Apr 2007 01:02:01 -0400 Subject: Re: [PATCH] powerpc pseries eeh: Convert to kthread API From: Benjamin Herrenschmidt To: "Eric W. Biederman" Cc: Linas Vepstas , Christoph Hellwig , ", containers@lists.osdl.org, Oleg Nesterov , linux-kernel@vger.kernel.org, Paul Mackerras , linux-s390@vger.kernel.org, linuxppc-dev@ozlabs.org In-Reply-To: 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> Content-Type: text/plain Date: Tue, 24 Apr 2007 15:00:42 +1000 Message-Id: <1177390842.14873.94.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > Further in general it doesn't make sense to grab a module reference > and call that sufficient because we would like to request that the > module exits. Which is, btw, I think a total misdesign of our module stuff, but heh, I remember that lead to some flamewars back then... 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). If we had done that (simple) thing back then, module refcounting would have been much less of a problem... I remember some reasons why that was veto'ed but I didn't and still don't agree. Ben.