Date: Sun, 11 May 2003 09:15:42 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Don Bowman <don@sandvine.com> Cc: freebsd-net@freebsd.org Subject: Re: polling(4) and idle time/cpu usage percentages Message-ID: <20030511091542.A59848@xorpc.icir.org> In-Reply-To: <FE045D4D9F7AED4CBFF1B3B813C8533701B36610@mail.sandvine.com>; from don@sandvine.com on Sun, May 11, 2003 at 12:05:23PM -0400 References: <FE045D4D9F7AED4CBFF1B3B813C8533701B36610@mail.sandvine.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 11, 2003 at 12:05:23PM -0400, Don Bowman wrote: > From: Kevin Day [mailto:toasty@dragondata.com] > > At 10:44 AM 5/11/2003, you wrote: > > >I tried the hack, as below. The other thing that makes idle > > >wildly inaccurate is the symmetric multi-threading on the xeon > > >(aka hyperthreading). > > > > Smack me if I'm wrong, but you can't compile the kernel with > > DEVICE_POLLING > > active at the same time as SMP. Without SMP you don't get any of the > > advantages/effects of HTT. > > > > (or has polling been made to play nice with SMP in -current?) > > DEVICE_POLLING actually works fine with SMP, there was just > some question as to whether it was the best way to make use > of the SMP. I just removed the #error in kern_poll.c in the > #ifdef SMP case. Interesting! Well, let's see: The polling code (including the code that schedules the cpu between kernel and userland) is written upon the assumption that only one polling loop is active. Now, because polling can occur in the idle loop or right after hardclock, and there are multiple concurrent idle_loops in the SMP cases, and the locking is just not there. Probably, the reason it works for you is that likely there is only one instance of hardclock handler, _and_ the idle_loop code is different for the UP and SMP cases, and I only provided polling hooks for the former. So you are limited to doing polling only in the assigned fraction of CPU, and the CPU(s) will not use any extra CPU for polling even if available. cheers luigi > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030511091542.A59848>