DragonFly kernel List (threaded) for 2004-01
Re: chooseproc cpu affinity question
Yes, the check for only the next one is intended. Putting a iterative
loop in the middle of the process selection code's critical path is
not very condusive to performance.
Well, but with n CPUs your chance is 1/n you hit one.
And the expected length k of the loop is << runqcount.
How expensive is an IPI plus cache invalidation plus cache misses
compared to k times this loop ?
I don't know and I don't want to step on anyones toes.
I just think it's worth a thought.
Maybe trying min(n, runqcount) times or so would do the job...
Campus der Max-Planck-Institute Tübingen
Netzwerk- und Systemadministration
Tel: +49 7071 601 598
Fax: +49 7071 601 616