Received: by oss.sgi.com id ; Tue, 20 Jun 2000 03:41:55 -0700 Received: from laurin.munich.netsurf.de ([194.64.166.1]:31371 "EHLO laurin.munich.netsurf.de") by oss.sgi.com with ESMTP id ; Tue, 20 Jun 2000 03:41:32 -0700 Received: from fred.muc.de (none@ns1165.munich.netsurf.de [195.180.235.165]) by laurin.munich.netsurf.de (8.9.3/8.9.3) with ESMTP id MAA05862; Tue, 20 Jun 2000 12:41:03 +0200 (MET DST) Received: from andi by fred.muc.de with local (Exim 2.05 #1) id 134LTW-0000Rq-00; Tue, 20 Jun 2000 12:41:46 +0200 Date: Tue, 20 Jun 2000 12:41:46 +0200 From: Andi Kleen To: Keith Owens Cc: Donald Becker , Andrew Morton , "netdev@oss.sgi.com" Subject: Re: modular net drivers Message-ID: <20000620124146.A1375@fred.muc.de> References: <3292.961460999@kao2.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4us In-Reply-To: <3292.961460999@kao2.melbourne.sgi.com>; from Keith Owens on Tue, Jun 20, 2000 at 02:33:47AM +0200 Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing On Tue, Jun 20, 2000 at 02:33:47AM +0200, Keith Owens wrote: > >> - All 2.4-only netdrivers can have all their MOD_DEC and MOD_INC calls > >> removed. All that twisty logic to keep track of the counts can be > >> tossed. A single > >> > >> SET_NETDEVICE_OWNER(dev); > > > >"Twisty logic"? Most of the drivers have straight-forward use counts. > >How is this new method any simpler? If anything, it seems to be more > >complex without any obvious benefit. > > There are inherent unload races when code that lives inside a module > tries to adjust the use count on that module. To the extent that the > code pages can be deleted underneath the code that is executing! > Module use counts need to be set before entering the module, not after > the module code has started executing. At least for open/close() that is not true -- rtnl_lock() protects against that. For that there are the same rules as in 2.2 (INC before first sleep, DEC after last sleep) -Andi -- This is like TV. I don't like TV.