3 ms·
Is there a scheduler API in Linux kernel already? If there isn't, it seems that developing schedulers would really benefit from the ability to have them loaded
by yason 17y ago
Is there a scheduler API in Linux kernel already? If there isn't, it seems that developing schedulers would really benefit from the ability to have them loaded / unloaded as kernel modules, like filesystems. The system could fall back to some generic round-robin scheduler if none of the more advanced schedulers were loaded, or when switching between schedulers.
I would want to try out BFS but I'm old enough to not take the time and effort to compile and patch my own kernel anymore, so I'll probably just wait until BFS becomes the default in mainstream kernels. If ever, considering the scheduler wars in the recent years.
A single kernel module I could compile and try out pretty easily, especially with module-assistant. Or if there's a .deb of Ubuntu kernel patched with BFS, that would do too.
I'm lazy, yes. Until I hack the Linux kernel day and night myself, it's probably better this way. But I would still like to try out BFS, up to some degree.
- alextp 17y agoLinus is openly opposed to the idea of scheduler modules, his argument being that schedules are core parts of a kernel, and modularizing schedulers woud encourage many different schedulers each good at a simple thing instead of a single scheduler well optimized for all workloads.
- joeyo 17y agoIt looks like we are getting that anyway, modular schedulers or no.
- alextp 17y agoUntil Linus goes commando and rewrites the scheduler, like he did with git, yeah.
- yason 17y agoYeah, the conclusion was something like this a couple of years ago when the issue was brought up on LKML. Too bad his opinion hasn't changed. I don't think it's a good idea to wait for the perfect one-size-fits-all scheduler instead of supporting competition between different schedulers. People have different needs and hence they need different schedulers -- I might suggest that it's be the only way to ever find the well-optimized single scheduler.