LWN: Comments on "Schedulers: the plot thickens" https://lwn.net/Articles/230574/ This is a special feed containing comments posted to the individual LWN article titled "Schedulers: the plot thickens". en-us Sun, 12 Oct 2025 20:48:28 +0000 Sun, 12 Oct 2025 20:48:28 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net *Ouch*. https://lwn.net/Articles/232067/ https://lwn.net/Articles/232067/ slamb <blockquote>But, on the other hand, runqueue handling is an issue that, so far, every scheduler has shown problem with, one time or another. The radical idea of doing away with them altogether certainly deserves a closer look.</blockquote> <p>I'm surprised by the combination of no one doing this before and someone doing it now. Before reading the recent article about the scheduler, I'd only seen priority queues implemented as an array of plain queues in cases where there were only a handful of priorities. When there's one per nice level (140?) or many more (priority is a function of nice level and timeslice left), it seems like trees or heaps would be an obvious choice. Having a sorted structure seems much simpler than doing these minor and major rotations to the array, with this secondary "expired" array. <p>So given that they originally did this a different way, the logical question is why. Was it so the time complexity could be O(p) [*] rather than O(log n)? Well, now Ingo's apparently thinking that's not important. How many processes was the O(1) scheduler designed to support? How long does Ingo's scheduler take to run in that situation? <p>If O(log n) does turn out to be a problem, I wonder if a mostly-sorted <a rel="nofollow" href="http:// en.wikipedia.org/wiki/Soft_heap">soft heap</a> would be better at amortized O(1). Faster as a whole, and "corrupting" a fixed percentage of priorities might not be a bad way to avoid total starvation of low-priority processes, but amortized time might mean it'd be too jerky to be used. <p>[*] - p = number of priorities...from skimming the description, it doesn't look like it was ever O(1) like the cool kids said. They just considered p to be a constant 140. Thu, 26 Apr 2007 21:58:57 +0000 Schedulers: the plot thickens https://lwn.net/Articles/231619/ https://lwn.net/Articles/231619/ jospoortvliet there isn't really a standard testsuite, but many of the problem cases (and the little code snippets to show 'em) are sticking around, and are used for testing new scheduler improvements/changes. Quite a few float around on the LKML and also on Dr Con's mailinglist.<br> Tue, 24 Apr 2007 12:25:38 +0000 Scheduler architecture and modularity https://lwn.net/Articles/231075/ https://lwn.net/Articles/231075/ brugolsky The "modularity" in Ingo's queue interface would seem to lend itself toward implementing something similar to the traffic control packet scheduler framework. IIRC, OpenVZ uses a TBF-based hierarchical fair scheduler; it would be interesting to see it ported to CFS.<br> Thu, 19 Apr 2007 13:12:39 +0000 Schedulers: the plot thickens https://lwn.net/Articles/231073/ https://lwn.net/Articles/231073/ i3839 Another important property of Ingo's scheduler is that the time is measured in nanoseconds. According to a later email, Ingo said that the earlier version without the high precision and using queues didn't work well at all. This are the two things that seem to have been limiting RSDL and other schedulers, as strange artefacts cropped up because of the queue and low granularity design.<br> <p> Peter William (of plugsched) also wrote a scheduler, and experience with trying out different things.<br> <p> William Lee Irwin III (now I understand why people call him wli ;-) is hammering on the importance of a standard test suite for schedulers, so if there are people with free time who want to help him with setting one up...<br> <p> Thu, 19 Apr 2007 12:34:13 +0000 rbtree is per-CPU https://lwn.net/Articles/231028/ https://lwn.net/Articles/231028/ smurf Gah. Forgive my sloppy use of language. By "single RB tree" I meant "a single tree to replace the former run queues structure", not "a single tree on the whole system". Process migration between CPUs is, after all, not going to go away.<br> <p> On another front, despite Con being rather miffed by Ingo's original patch, the subsequent dialog between them is a model of mutual respect that lots of people can learn from. Myself included.<br> Thu, 19 Apr 2007 06:47:28 +0000 rbtree is per-CPU https://lwn.net/Articles/231029/ https://lwn.net/Articles/231029/ kwchen Has anyone experimented with one scheduling entity per numa-node, or one per physical CPU package etc, instead of current one per CPU?<br> Thu, 19 Apr 2007 06:28:47 +0000 rbtree is per-CPU https://lwn.net/Articles/231027/ https://lwn.net/Articles/231027/ axboe Hi,<br> <p> The rbtree task timeline is per CPU, it's not a global entity. The latter would naturally never fly.<br> Thu, 19 Apr 2007 06:18:40 +0000 *Ouch*. https://lwn.net/Articles/231024/ https://lwn.net/Articles/231024/ smurf I can certainly understand Con.<br> <p> But, on the other hand, runqueue handling is an issue that, so far, every scheduler has shown problem with, one time or another. The radical idea of doing away with them altogether certainly deserves a closer look.<br> <p> I'm interested how the single-RB-tree idea will handle on a machine with a lot of CPUs. Off to check gmane.lists.linux.kernel ...<br> Thu, 19 Apr 2007 06:09:36 +0000 Schedulers: the plot thickens https://lwn.net/Articles/231015/ https://lwn.net/Articles/231015/ dlang if Ingo or Linus get fired up on a subject the process for testers is<br> <p> 1. find the latest version of the patch<br> 2. download it<br> 3. if on a slow link, go back to #1<br> 4. compile it<br> 5. if on a slow cpu, go back to #1<br> 6. start testing<br> 7. find bug<br> 8. go back to #1<br> 9. report bug.<br> <p> with normal developers you can count on the code being stable for a day or two after release, you don't have to keep checking for new releases<br> <p> yes, this is slightly exaggerating things, but not my much (sometimes it seems like the time it takes for you to read the e-mail announceing a release is enough time for an update)<br> Thu, 19 Apr 2007 02:33:53 +0000