[Top] [All Lists]

Re: modular net drivers

To: Keith Owens <kaos@xxxxxxxxxx>
Subject: Re: modular net drivers
From: Andi Kleen <ak@xxxxxx>
Date: Tue, 20 Jun 2000 12:41:46 +0200
Cc: Donald Becker <becker@xxxxxxxxx>, Andrew Morton <andrewm@xxxxxxxxxx>, "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
In-reply-to: <3292.961460999@xxxxxxxxxxxxxxxxxxxxxx>; from Keith Owens on Tue, Jun 20, 2000 at 02:33:47AM +0200
References: <Pine.LNX.4.10.10006192011230.26261-100000@xxxxxxxxxxxxx> <3292.961460999@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
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
> >> 
> >
> >"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) 

This is like TV. I don't like TV.

<Prev in Thread] Current Thread [Next in Thread>