Received: by oss.sgi.com id ; Wed, 21 Jun 2000 20:33:21 -0700 Received: from smtprch1.nortelnetworks.com ([192.135.215.14]:28118 "EHLO smtprch1.nortel.com") by oss.sgi.com with ESMTP id ; Wed, 21 Jun 2000 20:32:59 -0700 Received: from zrchb213.us.nortel.com (actually zrchb213) by smtprch1.nortel.com; Wed, 21 Jun 2000 22:31:48 -0500 Received: from zctwb003.asiapac.nortel.com ([47.152.32.111]) by zrchb213.us.nortel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id NKANW22W; Wed, 21 Jun 2000 22:32:55 -0500 Received: from pwold011.asiapac.nortel.com ([47.181.193.45]) by zctwb003.asiapac.nortel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id NCLF816D; Thu, 22 Jun 2000 13:32:51 +1000 Received: from uow.edu.au (IDENT:akpm@localhost [127.0.0.1]) by pwold011.asiapac.nortel.com (8.9.3/8.9.3) with ESMTP id NAA07017; Thu, 22 Jun 2000 13:31:39 +1000 Message-ID: <3951889B.B4BFEA36@uow.edu.au> Date: Thu, 22 Jun 2000 03:31:39 +0000 X-Sybari-Space: 00000000 00000000 00000000 From: Andrew Morton X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.4.0-test1-ac10 i686) X-Accept-Language: en MIME-Version: 1.0 To: Rusty Russell CC: Keith Owens , "netdev@oss.sgi.com" Subject: Re: modular net drivers References: Your message of "Wed, 21 Jun 2000 07:49:40 +1000." <4450.961537780@ocs3.ocs-net> <20000621065644.4B30A8154@halfway> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing Rusty Russell wrote: > > module_cleanup should unregister everything first, before doing other > cleaning up (which might sleep). Yup. module_cleanup() calls unregister_netdev(). It would be better to do the unregister_netdev(), then to wait for everyone to stop using the device (but how?) and to then reap the module. > ... > > I can provide code if this is still not clear how this keeps the > penalty for being a module in the module, and does not pollute the > rest of the kernel. Please. pseudo-code would suffice for me. Guys, I don't think we're going to solve this one any time soon. Unless Rusty has a trick up the sleeve I'll put together the patch which hoists the INC/DEC up into dev.c. At least that fixes some open/close races. Plus (here he goes again) timer deletion races are much more important...