polling(4) and idle time/cpu usage percentages

Don Bowman don at sandvine.com
Mon May 12 06:53:34 PDT 2003


From: Bruce Evans [mailto:bde at zeta.org.au]
> On Sun, 11 May 2003, Don Bowman wrote:
> 
> > From: Bruce Evans [mailto:bde at zeta.org.au]
> > > Did you try my hack?
> >
> > I tried the hack, as below. The other thing that makes idle
> > wildly inaccurate is the symmetric multi-threading on the xeon
> > (aka hyperthreading).
> 
> The variable needs to be per-cpu for the SMP case.  Perhaps there
> are other complications for SMP (from having to forward clock 
> interrupts).
> Hyperthreading might increase them.  Anyway, get the !SMP case working
> first.

 ...

Thanks very much for the feedback. As you say, I had neglected to
put a call in to poll in the smp idle loop. This is slightly more
complicated.
I'll work on getting the idle poll called in the smp case and make
the changes you suggested and see where that gets me.

thanks again!

--don


More information about the freebsd-net mailing list