Home Home > 2014 > 05 > 28 > Have some fun… patch your kernel
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Have some fun… patch your kernel

May 28th, 2014 by

On this point you should have compiled your own Linux kernel. Get it up and running with your hardware but what’s the catch with all of this? Why on earth I want to have this much trouble with my operating system when I can write highly popular fiction with DOS and Wordstar?

Patching

Being this old means that my first OS was MS-DOS (or was it AMIGA or can I count C-64 in?). It was MS-DOS version 3 and it was pain to use but 4DOS that was something! It had all the goodies that I’m enjoying in Unix Shell. I also have seen time before rise of Git or Kernel Bitbucket episode. It was those sweet times when Linux kernel was all about patches and there where no broadband connections for homes or 2/3/4/5G wireless Internet.
Patch is small text or binary file that tells what have changed in that particular file. So if two persons are working with same file and they don’t use version control (which they should use) then they should use patches. I have been long in enough in business and been university life (in specially ICT area) that I know most students tends to send whole changed file and you have to guess what have changed. That annoying and stupid many ways but most of the people argues that it’s safer to send whole file to make sure all changes are there. So I have to figure out what they have changed and what have I. I know how to make it but please please all of you should learn it and that end of that rant.
Nowadays most people favor GIT, Mercurial, Subversion or ancient but working CVS (Which was de-facto factory standard before Subversion). There is plenty more version control options to choose from but I think those are most popular.
They all work the same way deep down (especially GIT) than sending patch by mail. There just data base of file changes and If you do all of them you get solid file.

So what all of this means?

There is still one place where patches are feeling strong and that place is Linux kernel patches. Why to make kernel patch? You want to add new kernel feature but can’t get it in Linus Torvalds tree? Then you start to deliver it as a patch or patch-set.
There is many healthy patch-sets like openSUSE kernel patch-set if I have to mention one. Feeling utterly confused so it time to read this and this then you should understand little bit more and I can rest my hands for a while from writing.

Couple of patches BFS and BFQ

Ok I have wrapped some patches to fit with openSUSE kernel (For you to test with). BFQ is Budget Fair Queueing so it’s more robust than kernel default CFQ . CFQ is tuned for common rotating HDD and it’s behaving badly with SSDs. BFQ in other words works business as usual with SSD. What are I/O Schedulers? You got to read little bit here and here to understand about it.
So what is BFS? It’s more than I/O scheduler it’s for scheduling task and stuff like that. So both of them makes your desktop fly or they don’t. They are not part official kernel though both of them want to get in sooner than later.

Applying patch

Just download patches to your computer with (and remember they are for Linux kernel version 3.14 [they won’t work with version 3.something or up coming 3.15 they only work with version 3.14]).

wget https://raw.githubusercontent.com/illuusio/misc-patches/master/linux/opensuse/BFQ/3.14/0001-Budget-Fair-Queueing-I-O-Scheduler.patch
wget https://github.com/illuusio/misc-patches/raw/master/linux/opensuse/BFS/3.14/0002-The-Brain-Fuck-Scheduler-v0.447-by-Con-Kolivas.patch

and apply them again in root where you cloned git in first part

patch -p1 -i 0001-Budget-Fair-Queueing-I-O-Scheduler.patch
patch -p1 -i 0002-The-Brain-Fuck-Scheduler-v0.447-by-Con-Kolivas.patch

and then get config

wget https://raw.githubusercontent.com/illuusio/misc-patches/master/linux/opensuse/config-3.14-bfsbfq
cp config-3.14-bfsbfq .config
make oldconfig

then compile it like last time and get it working. Then you are again on your on in you journey to deeper knowledge.

Both comments and pings are currently closed.

2 Responses to “Have some fun… patch your kernel”

  1. Samuel Orr

    BFQ and CFQ are fine for ssds. http://algo.ing.unimo.it/people/paolo/disk_sched/results.php