Re: scheduling

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Fri, 1 May 1998 21:42:44 +0200 (MET DST)


On Fri, 1 May 1998, Alexander Kjeldaas wrote:

> This is exactly what I noticed while doing the pidhash patch. The
> scheduler is the only place in the kernel, except for three cases I
> think (killall, exit while being ptraced, and soon 'remove
> capabilities on all processes/set securelevel') that will traverse all
> processes. It is thus the only place where we depend on the number of

And soon the swapout/swapin routines...

> processes. However, I was not aware of any recent sched_yield() fixes
> [it was not fixed in 2.1.90 it seems], nor that the recalculations are
> less frequent when the number of processes grow. Considering 2000
> processes, that makes for a recalculation fewer than once per 6
> minutes.

That happens only when you actually have 6000 _running_
processes, in which case no calculation can save
performance :-)

> I agree that RL efficiency of the scheduler is most important, but
> nevertheless, it would be nice to remove the last "unnecessary"
> O(nr_tasks) from the kernel. [I _am_ taking for granted that someone
> will figure out how to do recalculations in less than O(nr_tasks) time
> ;-)].

For some things, you just want to do the O9(nr_tasks)
stuff. Even if it only was because you need data from
all processes to do your calculations :-)

(fair swapping can't be done without considering _all_
processes)

Rik.
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page | Scouting webmaster |
| - kswapd ask-him & complain-to guy | Vries cubscout leader |
| http://www.phys.uu.nl/~riel/ | <H.H.vanRiel@phys.uu.nl> |
+-------------------------------------------+--------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu