The search for the perfect kernel scheduler is like searching for the Holy Grail. Linux 2.6 started with the O(1) scheduler, which solved a lot of issues for real-time processes. However, it didn’t scale to large NUMA (non-uniform memory access) machines. The Linux kernel can scale to 4096 processors. Not all the processors have to share the same bus architecture and memory. Rather, a machine could consist of multiple 16 to 24 processor systems connected by a high-speed bus. This is the world of NUMA, as each system has its own memory that can be shared with other systems. The Completely Fair Scheduler (CFS) scaled to large NUMA machines, but created problems with systems that had less than 16 cores. CFS also scales well to the high core count of new GPUs (Graphic Processing Unit), which can also run non-graphical processes. For mobile devices with less than 16 cores, it creates problems with heating.
CFS trades higher kernel overhead for maximizing interactive performance. On mobile devices, the higher overhead means running the processor at higher speeds, which builds more heat. Heat is the enemy of every mobile device.
For a bit of background, Con Koliva developed the Rotating Staircase Deadline scheduler, which inspired Ingo Molnar to develop CFS. Seeing the problems with CFS, Con Koliva designed BFS (Brain Fucked Scheduler), an expression of how he felt about writing yet another scheduler. Con Koliva designed BFS for those devices with less than 16 cores, which, to the best of my knowledge, covers all mobile devices, and older non-mobile desktops.
Although it first appeared in September of 2009, there was not an immediate rush to switch from CFS to BFS. Android has a development branch that includes BFS. It was not included in the Froyo (Android 2.2) release, as a customer survey did not show any differences. At this time, only Zenwalk 6.4 and PCLinuxOS 2010 use BFS as the default scheduler. As it matures, you may see BFS appear in other mobile projects, such as MeeGo.
As I mentioned in the Fedora 13 review, the HP laptop used for testing actually halted due to overheating of the CPU. A subsequent discussion in the comments pointed to CFS as the culprit. In running my tests with PCLinuxOS 2010 for the xfce and LXDE desktops, the fan was amazing quiet. Playing a DVD movie didn’t even result in the fan starting. In my opinion, BFS does make a difference. For those of you who are having laptop cooling issues, PCLinuxOS 2010 is a definite alternative. I wouldn’t hold my breath about BFS appearing as an alternate scheduler in the official kernel source tree. Personally, I see it, or a variation, becoming the standard scheduler for mobile devices, and, possibly, embedded Linux.

10 comments ↓
PCLinux OS is a very interesting project, and have a test installation on the family desktop PC dual booting with XP, yet I wouldnt migrate completely to it on my work and personal laptops (even though heating is becoming more and more of a problem lately) because of two hindrances:
- There is no x64 architecture support, at all
- It remains RPM based, this is more of a personal thing since i prefer DEB distros.
I could just let go on the second issue, but the first is a deal breaker for me.
For most of my work, I use openSUSE. Consequently, I really don’t distinguish between RPM and DEB packages. If you have a 64-bit machine, then that is a big issue. Alas, all my ancient laptops are 32-bit. In fact, I am thinking leaning towards replacing Xubuntu with PCLinuxOS LXCDE on a Micron laptop with only 256 meg of memory. However, I may have to do port some Ham Radio applications to PCLinuxOS, as it is the machine that is linked to my radio.
This morning, I searched for BFS on distrowatch.com, and found a number of additional distros that use BFS as a scheduler.
BFS is gaining transaction, as not everyone has machines with 16, or more, cores.
Given that you have switched to a totally different Linux distribution saying that the kernel’s scheduler is the thing which fixed your issue is a guess more than anything else IMHO.
Unity Linux is offering a BFS kernel as an optional install from the repositories as well. I think most distros will begin offering this as popularity increases.
I ran on PCLinuxOS for several years, but was forced to switch distros when I purchased a new 64-bit desktop computer.
I’m now using Ultimate Edition 2.7 (64-bit).
I switched again, and will switch serveral more times. It is a test machine. I just installed openSUSE 11.3 LXDE. I run three distros on the machine. One has to be CentOS. The other two are in flux. One will probably be a version of Linux Mint 9, possible LXDE or Xcfe. I am thinking the third should be a kernel running a BFS kernel. That is one machine. Once I finish the experimenting with various distros on it. I start on the Dell Inspiron 8100., One will be openSUSE 11.3, desktop to be determined. The other two are still a question. Then there is my ancient Micron laptop that connects to my ham radio. For it, the determining factor is the number of ham radio applications supported by the distro. The largest repositories are Debian, openSUSE and Fedora. Since the laptop only has 256 MiB of memory Fedora is definitely out. It will probably be a Debian derivative, as PCLinuxOS has a really small number of ham radio applications. For the Micron, the install has to be from a CD, which leaves out a lot of distros, including openSUSE. So the experimentation continues, and the heating question is still going to be addressed.
The Unity project looks interesting, I will have to give it a try once I finish my current round of testing.
[...] 今年的 PCLinuxOS 2010 和 Zenwalk 6.4 都将使用 Con Koliva 的 BFS (Brain Fucked Scheduler) 内核补丁替换掉默认的 Completely Fair Scheduler (CFS) 。据悉 Android 和 Meego 也都将使用 BFS。可能各大发行版将 BFS 版内核作为桌面版默认内核已经不会很远了。 本站之前对BFS 的相关介绍 消息来源 [...]
While the Android build tree includes BFS, I still haven’t seen it move into the released builds. I liked Meego, but its future is dim.
Leave a Comment