LWN.net Logo

CFS and SD internals, design

CFS and SD internals, design

Posted Jul 28, 2007 12:30 UTC (Sat) by jospoortvliet (subscriber, #33164)
In reply to: CFS and SD internals, design by mingo
Parent article: Still waiting for swap prefetch

Thanx, Ingo, an excellent explanation. I wonder if you could elaborate on
the following you wrote:

This mechanism and implementation is basically not comparable to SD in
any way, the two schedulers are so different. Basically the only common
thing between them is that both aim to schedule tasks "fairly" - but even
the definition of "fairness" is different: SD strictly considers time
spent on the CPU and on the runqueue, CFS takes time spent sleeping into
account as well. (and hence the approach of "sleep average" and the act
of "rewarding" sleepy tasks, which was the main interactivity mechanism
of the old scheduler, survives in CFS. Con was fundamentally against
sleep-average methods. CFS tried to be a no-tradeoffs replacement for the
existing scheduler and the sleeper-fairness method was key to that.)

How does this work, and effect fairness? I mean, can you tell a bit more
on the difference between SD and CFS in this area? (I'm pretty
interested, that's all)


(Log in to post comments)

CFS and SD internals, design

Posted Sep 18, 2007 9:25 UTC (Tue) by mingo (subscriber, #31122) [Link]

How does this work, and effect fairness? I mean, can you tell a bit more on the difference between SD and CFS in this area? (I'm pretty interested, that's all)

The practical difference is noticeable for something like the X server - Xorg is often a "sleepy" process but it's important that when it runs it gets its own maximum share of CPU time. With a "runners only" fairness model it will receive less CPU time than with a "sleepers considered too" (CFS) fairness model.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds