Re: RFC: issues concerning the next NAPI interface



From: Jan-Bernd Themann <ossthema@xxxxxxxxxx>
Date: Tue, 28 Aug 2007 13:19:03 +0200

I will try the following scheme (once we get hrtimers): Each device
(queue) has a hrtimer. Schedule the timer in the poll function
instead of reactivating IRQs when a high load situation has been
detected and all packets have been emptied from the receive queue.
The timer function could then just call netif_rx_schedule to
register the rx_queue for NAPI again.

Interrupt mitigation only works if it helps you avoid interrupts.
This scheme potentially makes more of them happen.

The hrtimer is just another interrupt, a cpu locally triggered one,
but it has much of the same costs nonetheless.

So if you set this timer, it triggers, and no packets arrive, you are
taking more interrupts and doing more work than if you had disabled
NAPI.

In fact, for certain packet rates, your scheme would result in
twice as many interrupts than the current scheme.

This is one of several reasons why hardware is the only truly proper
place for this kind of logic. Only the hardware can see the packet
arrive, and do the interrupt deferral without any cpu intervention
whatsoever.
-
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

  • Re: High resolution timer on kernel mode
    ... timer all of the time ... ... So for me if the packets are coming in very slowly ... ... generated but nic harware interrupt generated. ... alternatives for NDIS drivers that are not NDIS-WDM. ...
    (microsoft.public.development.device.drivers)
  • Re: RFC: issues concerning the next NAPI interface
    ... So NAPI does not work very well here and the interrupt ... Introduce a timer, but don't start to use it to combine packets unless you ... Lets say its 10 per millisecond ("typical" for a gigabit eth runnning ...
    (Linux-Kernel)
  • Re: High resolution timer on kernel mode
    ... I have a TDI driver and its IOCTRL dispatch function gets called by ... timer all of the time ... ... So for me if the packets are coming in very slowly ... ... generated but nic harware interrupt generated. ...
    (microsoft.public.development.device.drivers)
  • Re: High resolution timer on kernel mode
    ... I need to take the packet in this IM driver and send it to a special ... how to use its interrupt to speed up my NDIS IM driver. ... timer all of the time ... ... So for me if the packets are coming in very slowly ... ...
    (microsoft.public.development.device.drivers)
  • Re: wireless card driver problem about the "done" bit in the descriptor && the bail caused b
    ... And i found that after receiving about 20 packets, ... or a "rxdp bail", the whileloop break, while no interrupt to make ... it off and do a jobQueuePostto wake up tNet0. ... can usually see which descriptors need processing by testing a status ...
    (comp.os.vxworks)