netdev
[Top] [All Lists]

Re: tx_timeout and timer serialisation

To: Andrew Morton <andrewm@xxxxxxxxxx>
Subject: Re: tx_timeout and timer serialisation
From: Donald Becker <becker@xxxxxxxxx>
Date: Thu, 18 May 2000 10:34:02 -0400 (EDT)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <3923F8CD.AECBDA6D@xxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Fri, 19 May 2000, Andrew Morton wrote:
> kuznet@xxxxxxxxxxxxx wrote:

> > Timers are self-destructable as rule. See? Normal usage
> > for timer is to have it allocated inside an object and
> > timer event detroys the object together with timer.

I'm curious -- what code does this?

> Still, my immediate concern is this:
> 
> I'll be spending the next <however long it takes> working through the
> old net drivers.  One very common theme/bug in these is the pattern:
> 
> xxx_close()
> {
>       ...
>       del_timer();
>       release(some_resources);
>       ...
> }
> 
> xxx_timer()
> {
>       use(some_resources);
> }

I don't see the semantic problem here.
This was the recommended way to use the timer routines.  If the semantics
have changed, there should be new names for the changed semantics.

It would be useful to distinguish between "bugs" and "interfaces changes
that have made the following no longer correct since version X.Y.Z".

> With a lot of the old ISA drivers this is a lost cause.  The probability
> of breaking the driver for UP is sufficiently high, and the usefulness
> of making it SMP-aware is sufficiently low that we should simply say
> 
> #ifdef CONFIG_SMP
> #error This driver does not support SMP
> #endif

Donald Becker                           becker@xxxxxxxxx
Scyld Computing Corporation
410 Severn Ave. Suite 210
Annapolis MD 21403



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