cvs commit: src/sys/pci if_xl.c if_xlreg.h

Gleb Smirnoff glebius at FreeBSD.org
Wed Dec 6 09:37:24 PST 2006


On Wed, Dec 06, 2006 at 09:12:23AM -0800, Sam Leffler wrote:
S> > On Wed, Dec 06, 2006 at 06:01:48PM +1100, Bruce Evans wrote:
S> > B> It's a shame to force all NIC drivers to manage the timeout for this.
S> > B> Most have a timeout for other purposes so I couldn't see how to save
S> > B> much code using a callback, but a callback would be cleaner.  (To avoid
S> > B> the race, just move the decrement of the count to drivers.)
S> > 
S> > It is a shame to have a two extra fields in struct ifnet, just for
S> > the sake of the drivers that can wedge. It is a shame to go through
S> > the whole list of interfaces every second.
S> > 
S> > There are routers with few NICs and dozens of vlan(4) interfaces. There
S> > are also PPP concentrators with up to thousand interfaces and only
S> > one NIC that really needs to have its watchdog.
S> 
S> I agree with both sentiments and as the originator of the ifnet watchdog
S> mechanism I can only say that it's high time it was replaced by
S> something better.  My main worry with this change is that people will
S> _blindly_ sweep drivers replacing what was previously a fairly
S> lightweight mechanism with something much more expensive.

I have thought a little bit about this. Even in case if every interface
in system schedules its own watchdog, a search through the list of scheduled
callouts isn't worse than going through the list of all interfaces, as we
have now.  And it is locked finer, since doesn't holds the IFNET_RLOCK,
just holds the mutex of current callwheel slot.

Since most drivers already have periodic (usually 1 sec) callouts,
piggybacking on them will not increase number of scheduled callouts.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE


More information about the cvs-src mailing list