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


Sunday, 9 August 2015

BFS 464, linux-4.1-ck2

Here's an updated BFS/CK which includes the one test patch I put on this blog after 463 and another trivial fix for the previous release. The patch fixed a lot of regressions including hangs with BTRFS and panics on shutdown.

BFS by itself:


-ck branded linux-4.1-ck1 patches:

4.1-ck2 patches