Friday, 25 March 2016

BFS 469, linux-4.4-ck1, linux-4.5-ck1

Announcing an updated BFS for linux-4.4 and 4.5 based kernels.

BFS by itself:

-ck branded linux-4.5-ck1 patches:

This is purely a resync of BFS 467 from 4.3-ck3 to the current kernels. The only change is extra documentation of the interactive tunable in the scheduler documentation, and a build warning fix for uniprocessor builds.

While linux-4.5 is the latest kernel, as I had been slow in syncing up and missed 4.4, and given that 4.4 is deemed a Long Term Stable release, I've provided resyncs with both. Version number differences of 467/469 are only due to syncing with different kernels and otherwise they are only trivially different.

The patches are fairly new without a great deal of testing, so the usual warnings apply, but given how long it took me to getting around to catching up, I didn't want to delay releasing them.


Tuesday, 15 December 2015

BFS 467, linux-4.3-ck3

Announcing an updated BFS for linux-4.3 based kernels.

BFS by itself:

-ck branded linux-4.3-ck3 patches:

After my initial enthusiasm regarding the improved throughput on the previous BFS release, I unfortunately had some reports of regressions in interactive behaviour for the first time in a while, both on this forum and through other channels. So for the first time in a while, I've released a -ck3 with yet another updated BFS to address this since I can't stand having a dodgy release out for any extended period.

With this release what I've done is reinstate an old tunable that used to be on my scheduler patches many years ago


This has two settings, 1 for on and 0 for off. By default - of course since this is BFS - it is set to 1. What it does is prioritise latency over throughput in mode 1 and vice versa in mode 0. In addition to addressing the latency issues in the previous kernel, mode 1 actually completely turns off all soft affinity scheduling in the kernel, for the lowest possible latencies all round, so this may be the first kernel with an improvement in latency in a while too.

Bear in mind none of these changes make any difference on uniprocessor kernels so there is no need for UP users to update unless they need the build fixes that came with BFS466+.

Amusingly enough, linux-4.3.2 wouldn't boot for me for unrelated reasons so I'm using 4.3.0-ck3 myself. So if you can't get 4.3.2 to boot, roll back.


Friday, 11 December 2015

BFS 466, linux-4.3-ck2

Announcing an updated BFS for linux-4.3 based kernels.

BFS by itself:

-ck branded linux-4.3-ck2 patches:

In addition to a build fix for the nohz compile issue with BFS 465, this is the first BFS in a very long time to have performance improvements. For some time now it's bugged me that tasks would have very poor affinity with CPUs on BFS, even if the performance was good. By this I mean if you fired up a fully CPU bound task and watched a CPU monitor/graph on a multicore machine, you'd see the one task would bounce around from CPU to CPU very frequently instead of occasionally. While this was great for latency purposes and interactivity, single threaded workloads would suffer as a result, and additionally it would represent a small amount of performance loss in multithreaded workloads too since CPU cache effects improving throughput would be diminished. Every time I'd previously tackled this issue, I found myself making some other workload worse.

After approximately 100 rebuilds of the kernel and benchmarking, I finally found where the problem lay, and it wasn't just trying to maintain bias against moving tasks from CPU to CPU, it was also that the code responsible is in the most frequently traversed code path in the schedule() call. Simplifying the code that biased against moving tasks in earliest_deadline_task, as well as calling on the bias for all tasks, not just fully CPU bound tasks, improved performance statistically significantly without detriment to latency or other workloads in my testing.

Apart from improving measurable throughput benchmarks, users may notice that some workloads that are single threaded (such as some video playback software, or even virtualisation with kvm etc.) may actually improve because of their ability to bind to one CPU better and not incur the wrath of being moved to a CPU speed throttled for power saving. Please give it a whorl and report back anything you find, positive or negative - though it should all be positive. If you have benchmarks you want to throw at it, even better.

EDIT: After the initial enthusiasm, it appears this DOES have a detrimental effect on interactivity so I will be looking for another change in the near future with yet another release.


Thursday, 12 November 2015

BFS 465, linux-4.3-ck1

Finally a resync to mainline linux, with linux-4.3.

BFS by itself:


-ck branded linux-4.3-ck1 patches:

4.3-ck1 patches

In addition to the usual collection of resyncs and minor updates, this includes 3 patches courtesy of Alfred Chen who maintained the fort while I was too busy to work on a resync for linux-4.2. (THANKS!) His changes fix a warning that happens on some system on startup, hopefully fix the long standing hang on heavy file access with truly unlocked block flush unplugging, and a build problem.

With such a large resync and update, the usual warnings apply regarding instability, file system corruption and unwanted impregnations.

EDIT: Build fix: bfs465-nohz-buildfix.patch