On Tue, 21 Nov 2000, Ramon van Handel wrote:

> Kevin Lawton wrote:
> > Which brings up something else.  One nice thing to put into
> > open source OSes would be calling an interface to the VM
> > code to handle delay loops.
> 
> Most OSes do this pretty well...
> If they can't fill up the delay, they call
> HLT to idle the processor.
> 

Why not increment the counter by 10,000 every 10,000 instructions? or
something... I dunno if any of you have seen prumpf's patch to .18, but it
uses the lower order value to do fine delays. it's not yet in 2.4
(afaik) but the delay loop is caliberated by that method... modern
processors get thru *a lot* of cycles in 1/100'th of a second, so why not
increment the counter every 1/1000'th or whatever? either that or feed the
(real_one - start_value) / n in, where n is worked out by loads, or just 3
or something? 

-- 

Mark Zealey (aka JALH on irc.openprojects.net: #zealos and many more)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

UL++++$ (GCM/GCS/GS/GM)GUG! dpu? s-:-@ a15! C+++>$ P++$>+++@ L+++>+++++$
!E---? W+++>$ N++@>+ o->+ w--- !M--? !V--? PS- PE--@ !PGP----? r++
!t---?@ !X---? !R- b+ !DI---? e->+++++ h+++*! y-

(www.geekcode.com)


Reply via email to