[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070828.132152.38706038.davem@davemloft.net>
Date: Tue, 28 Aug 2007 13:21:52 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: ossthema@...ibm.com
Cc: jchapman@...alix.com, shemminger@...ux-foundation.org,
akepner@....com, netdev@...r.kernel.org, raisch@...ibm.com,
themann@...ibm.com, linux-kernel@...r.kernel.org,
linuxppc-dev@...abs.org, meder@...ibm.com, tklein@...ibm.com,
stefan.roscher@...ibm.com
Subject: Re: RFC: issues concerning the next NAPI interface
From: Jan-Bernd Themann <ossthema@...ibm.com>
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists