Tuesday, 18 August 2026

I/O aware CPU scheduling support discussion

 You may have seen the new I/O aware scheduling support mentioned in the announce posts or as an option when configuring your kernel. This was my attempt to tackle a long-standing problem with CPU scheduling whereby a task does some I/O work - read or write, and then it returns and gets high priority treatment since it's seen as a sleep. This leads to heavy I/O tasks getting preferential treatment when they could be bogging down the system for both CPU and I/O. Tackling this required a fairly invasive patch that incurs overhead that would be considered problematic if looking at it purely from the I/O performance perspective. That is why I made it configurable at kernel config, but defaulting to on since muqss users are rarely interested in I/O benchmarks. The effect on performance is quite negligible.

 However it unfortunately only realistically helps for the lesser half of the problem - reads. Writes are much slower and also tend to bog the system down much more. Whilst the code does try to attribute write time to the calling task, the nature of the linux writing subsystem means it all happens way too late to actually help. Writes are handed off the the virtual memory subsystem as "dirty" ram and then subsequently written out often many seconds later. By that time the CPU scheduling of the calling task has long since ended and the process may not even exist anymore. Nonetheless since I was implementing it, I included this path in the unlikely even there was a sustained write streaming task for it to be captured.

The following sysctls may theoretically help at capturing the writes better, but I've been unable to demonstrate a significant improvement, and they may have undesirable effects so I have not included them in -ck:

echo 0 > /proc/sys/vm/dirty_expire_centisecs
echo 1 > /proc/sys/vm/dirty_writeback_centisecs 

I'm curious to see if anyone has a workload they find this does help with, as I could gate these as default settings behind the I/O aware config option as defaults.

 

If you want to see the effect of having every task (effectively) wait for its writes before moving on, try setting this sysctl as root:

echo 0 > /proc/sys/vm/dirty_ratio

 Write performance crashes to a fraction of normal, and even a kernel compile takes more than twice as long. The normal value is 20 for when you want to restore it. Setting it to 1 is no better than 20 for any meaningful effect, as it does nothing to actually help capture write times and attribute them to the calling task.

-ck 

Monday, 17 August 2026

Linux-7.2-ck1, MuQSS v0.310 for linux 7.2.

 The -ck patchset aims to improve desktop/mobile device responsiveness, interactivity, and gaming, mostly by replacing the CPU scheduler en-bloc with my MultiQueue Skiplist Scheduler.

 github.com/ckolivas/linux 

New feature: I/O aware CPU scheduling accounts read and write time to the calling task. Also accounts work done in kthreads on behalf of a calling task. 

Numerous bugfixes for suspend/hibernate/shutdown, hotplug, and minor tweaks. 

Dropped irqthreads as it was a net negative for workstations.

Patch list: 

  Add -ck1 version.
 Make nohz_full not be picked up as a default config option and add recommendation to help.
 Set default Hz to 100 in combination with MuQSS and -ck patches.
 Make hrtimer granularity and minimum hrtimeout configurable in sysctl. Set default granularity to 100us and min timeout to 500us.
 Don't use hrtimer overlay when pm_freezing since some drivers still don't correctly use freezable timeouts.
 Replace all calls to schedule_timeout_uninterruptible to use schedule_msec_hrtimeout_uninterruptible.
 Replace all calls to schedule_timeout_interruptible to use schedule_msec_hrtimeout_interruptible.
 Convert msleep to use hrtimers when active.
 Convert all low value schedule_timeouts to their hrtimeout equivalents.
 Create highres timeout variants of schedule_timeout functions.
 Make preemptible kernel default.
 MultiQueue Skiplist Scheduler v0.31.

 

I got the message there were enough people still following this blog so I will not be dropping it. 

Enjoy!

お楽しみください 

--- 

-ck


Saturday, 15 August 2026

NOT Dropping this blog

 No one reads this any more, and it's just one more place for me to post so I'm just going to stop posting and eventually delete this.

 You can still find me here: https://x.com/ckpooldev

EDIT: If there is enough interest I will reverse this decision. I've opened up posting comments to anyone as well now. Warning about my twitter account - it's mostly about bitcoin, so if that's a problem then I can maintain this for everything else.

 EDIT2: Okay I got the message, I'll keep it going. Thanks everyone for responding. 

Thursday, 13 August 2026

Linux-7.1-ck2

Numerous fixes to bring functionality in line with mainline 7.1.
Micro-optimisations.
Set -ck defaults in kernel config.

Release: 

 https://github.com/ckolivas/linux/releases/tag/v7.1-ck2 

Tag: 

 https://github.com/ckolivas/linux/tree/v7.1-ck2 

お楽しみください

-ck