Re: network driver usage count



Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx> writes:

On Wed, 21 Nov 2007 20:45:11 +0100
Ferenc Wagner <wferi@xxxxxxx> wrote:

Under 2.6.23.1, my lsmod output shows this:

$ lsmod | grep tg3
tg3 100580 0

The usage count is zero, even though it drives my two physical
interfaces:

$ ls -l /sys/class/net/eth-gb?/device/driver
lrwxrwxrwx 1 root root 0 2007-11-21 19:58 /sys/class/net/eth-gb1/device/driver -> ../../../bus/pci/drivers/tg3
lrwxrwxrwx 1 root root 0 2007-11-21 19:58 /sys/class/net/eth-gb2/device/driver -> ../../../bus/pci/drivers/tg3

These interfaces are up and bonded together, but that doesn't seem to
matter at all. I also checked other machines, the network driver
(tg3, e1000) usage counts are always zero under various recent 2.6
kernels, but nonzero under 2.4.21 for example.

And really, the module could be removed, cutting my ssh session. :)

Was this made possible intentionally? If yes, why?

Yes, so devices can be removed at anytime.

Hmm, that would warrant nuking all the reference counts on every
driver. I must be missing something, since I really feel it goes
against common sense. Can you point me to some discussion of this
change? I mean, I couldn't remove the driver of a mounted filesystem.
So why can I remove a driver serving live network traffic?
--
Thanks,
Feri.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • network driver usage count
    ... The usage count is zero, even though it drives my two physical ... These interfaces are up and bonded together, ... (tg3, e1000) ...
    (Linux-Kernel)
  • Re: VxWorks 6.6 - Ethernet interface driver support
    ... Ethernet interface cards, deploying the "Intel PRO/1000 VxBus Enhanced ... Network Driver" in conjunction with the "Generic PHY driver", ... these interfaces. ...   MII_Bus @ 0x005073cc ...
    (comp.os.vxworks)
  • Re: HP-PB 10/100 10.20 driver?
    ... If there is no downloadable driver, ... an HP-PB FDDI card crippled with a 1500 byte MTU. ... the 100BT interfaces were ... Size Size Size Time Throughput local remote local remote ...
    (comp.sys.hp.hpux)
  • Re: VxWorks 6.6 - Ethernet interface driver support
    ... electrical Ethernet interfaces with optical Ethernet ... interfaces (DSS PMC card), so I wanted to disable the Generic PHY ... driver would result in removing also the Intel PRO/ ... CTRL register bits RFCE (Receive Flow Control Enable) and TCFE ...
    (comp.os.vxworks)
  • Re: Windows Scheduling on I/O bound systems with >2 cores/processo
    ... Each process does the continuous read & write DMA operations ... CPU usage: On <= 2 processor systems, ... We are running Load test on our PCI IO card(WDF driver), ... On machines with>2 processors a single process would execute its read ...
    (microsoft.public.development.device.drivers)