From owner-freebsd-current@FreeBSD.ORG Tue Nov 6 11:35:18 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 368BDBBD for ; Tue, 6 Nov 2012 11:35:18 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 866838FC15 for ; Tue, 6 Nov 2012 11:35:17 +0000 (UTC) Received: (qmail 14062 invoked from network); 6 Nov 2012 13:10:45 -0000 Received: from unknown (HELO [62.48.0.94]) ([62.48.0.94]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 6 Nov 2012 13:10:45 -0000 Message-ID: <5098F64E.1070704@freebsd.org> Date: Tue, 06 Nov 2012 12:36:46 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Luigi Rizzo Subject: Re: polling's future [was: Re: Dynamic Ticks/HZ] References: <509758B8.1000409@rewt.org.uk> <50975F6F.6010907@rewt.org.uk> <5097898C.9080109@rewt.org.uk> <20121105163654.GA12870@onelab2.iet.unipi.it> <5097E880.8010001@rewt.org.uk> <20121105165748.GA13098@onelab2.iet.unipi.it> <5098E526.6070101@freebsd.org> <20121106113014.GA26313@onelab2.iet.unipi.it> In-Reply-To: <20121106113014.GA26313@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Davide Italiano , Joe Holden , Ryan Stone , FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2012 11:35:18 -0000 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