From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 01:14:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D6C216A41F for ; Tue, 10 Jan 2006 01:14:21 +0000 (GMT) (envelope-from nielsen@memberwebs.com) Received: from mail.npubs.com (mail.npubs.com [209.66.100.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8AC343D46 for ; Tue, 10 Jan 2006 01:14:20 +0000 (GMT) (envelope-from nielsen@memberwebs.com) From: Nate Nielsen User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ed Maste References: <20060106022920.BF7DADCA990@mail.npubs.com> <20060107231659.DD05BDCA9A5@mail.npubs.com> <20060109183756.GA14717@sandvine.com> X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20060110013318.B8E42DCAA15@mail.npubs.com> X-Virus-Scanned: ClamAV using ClamSMTP Date: Tue, 10 Jan 2006 01:33:22 +0000 (GMT) X-Mailman-Approved-At: Wed, 11 Jan 2006 04:19:22 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Polling for devices other than NICs [patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 01:14:21 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ed Maste wrote: > In addition, the current polling algorithm breaks down when you get to > very high CPU utilization by the stack (e.g. if acting as a high > bandwidth router). This happens because it adds one count per tick > if the polling did not run longer than one hardclock interval, but > brings it down to 7/8ths if it did. > > This ends up producing a sawtooth effect in the amount of work done by > the polling handlers. Andre Oppermann is performing some high-perf > stack testing, and he ran into this effect; in polling mode the maximum > packet rate was achieved while there was still idle CPU time. Interesting. My (simple) work on this has been on low powered CPU machines (such as the Soekris single board systems): http://memberwebs.com/nielsen/freebsd/slow-cpu-routers.html > I have a proof of concept patch that modifies the polling feedback > algorithm to measure the amount of time spent in the polling handlers, > and then attempt to schedule an appropriate amount of work to fill out > the time slot. Andre is going to be testing it out shortly. > > Don't get me wrong, I think your patch is a step in the right direction, > but we do have more work to do in order to completely generalize the > polling code. Agreed. And sometime in the future, we should probably work towards implementing auto-switching between polling and interrupts: http://www.stanford.edu/class/cs240/readings/mogul.pdf Cheers, Nate -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDwwfte/sRCNknZa8RAnMAAJ0de3eQELrbEgp5NF56wFtR2poYBACbBetq p/ZLh5bY6dbdPiIkIJMsCEM= =RADi -----END PGP SIGNATURE-----