tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CPUs and processes not evenly assigned?!



On Sun 27 Nov 2016 at 08:01:07 +0000, Michael van Elst wrote:
> I've made a new patch:
> 
> http://ftp.netbsd.org/pub/NetBSD/misc/mlelstv/kern_runq.diff
> 
> -> it uses 8 guard bits (multiply by 256 instead of 2).
> -> it lets you configure the moving average factor in percent
>    (default is 50% like now) with a sysctl.

It could be slightly more efficient (no div instructions to divide by
100, but shifts to divide by 256) when the second one isn't expressed in
the range [0, 100) but [0, 255). Also it feels like there is a mismatch of
precision of the divided-by-100 result when using 8 bits for the
fraction (only 100 out of the 256 possible fractions are used).

Small thing, but easy to do.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/xs4all.nl    -- are condemned to reinvent it. Poorly.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index