Re: polling's future [was: Re: Dynamic Ticks/HZ]

From: Andre Oppermann <andre_at_freebsd.org>
Date: Tue, 06 Nov 2012 12:36:46 +0100
On 06.11.2012 12:30, Luigi Rizzo wrote:
> On Tue, Nov 06, 2012 at 11:23:34AM +0100, Andre Oppermann wrote:
> ...
>> Hi Luigi,
>>
>> do you agree on polling having outlived its usefulness in the light
>> of interrupt moderating NIC's and SMP complications/disadvantages?
>
> yes, we should let it rest in peace.

Thank you for this non-complicated answer. :-)

> One part of the NIC-polling framework is now obsoleted by the
> interrupt moderation that most NICs support (note though that
> almost none of the popular hypervisors emulate interrupt moderation
> so your network performance in a VM will be awful under heavy load.)
>
> Unfortunately another part will be lost even on bare hardware:
> NIC-polling, as implemented in FreeBSD, had the ability to cap the
> amount of CPU time spent in the polling loop during each tick, thus
> making sure there is no livelock.  Neither taskqueue nor NAPI (in
> linux world) have this feature.

taskqueue could have this feature.  It may possibly need some assistance
from the scheduler to get his right.  It's a feature of the packet loop
though.  If we can provide a common function providing a yield signal 
that would run after each batch of packet dequeues the taskqueue can be
made less predatory.  For packet drop an advanced but simple algorithm
like CoDel could be used to keep the DMA ring moving.

-- 
Andre
Received on Tue Nov 06 2012 - 10:35:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:32 UTC