Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 19 Sep 2002 09:49:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 19 Sep 2002 09:49:53 -0400 Received: from smtpzilla1.xs4all.nl ([194.109.127.137]:59653 "EHLO smtpzilla1.xs4all.nl") by vger.kernel.org with ESMTP id ; Thu, 19 Sep 2002 09:49:52 -0400 Date: Thu, 19 Sep 2002 15:54:40 +0200 (CEST) From: Roman Zippel X-X-Sender: roman@serv To: Rusty Russell cc: kaos@ocs.com.au, Subject: Re: [PATCH] In-kernel module loader 1/7 In-Reply-To: <20020919125906.21DEA2C22A@lists.samba.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1368 Lines: 32 Hi, On Thu, 19 Sep 2002, Rusty Russell wrote: > If every single object in the kernel is reference counted, *yes* you > can do this. But they're not, and they will never be. Changing them > over to use try_module_get() is feasible, though. Rusty, slowly I'm pissed. :( I already said often enough, a module has only to answer the simple question: Is it safe to unload the module? Reference counts is the simplest way, but I'm sure even you can come up with other methods. On the other hand you force on _everyone_ to use try_module_get(), which are nothing else than reference counts. As I already wrote in my last mail: This is simple resource management, everyone writing kernel code has to do this anyway, adding modules to this picture doesn't change it much. As long as you have control over all your objects, you also know easily whether it's safe to unload or not, but only the driver knows this, the module code can only guess or it has to be told explicitely via try_module_get(). In other words: If you get it right with try_module_get(), you will more easily get it right with reference counts. bye, Roman - 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/