Thursday 3 July 2014

BFS 0.448, 3.15-ck1

Announcing a resync and update of BFS for linux kernel 3.15.x. I'm currently on vacation but fortunately had enough downtime to hack this together in the evenings and pinged a few people to do some testing for me before releasing it since I only have my laptop with me and could not do the usual set of build and run tests on multiple configurations (thanks!).
 This is basically a resync of the last BFS along with trivial changes to stay in sync with the mainline kernel, along with some of the queued build fixes submitted by others on this blog (thanks!). Alas the users of ath9k with Tux On Ice that I pinged early on with a test patch have shown the same issue exists (which is not surprising since BFS has only been trivially changed in quite a few releases now) so I'm pretty sure whatever the interaction is was introduced somewhere between 3.13 and 3.14.
I have reviewed Alfred Chen's patches and for the time being have not included them in BFS, though I do like the direction his changes have taken. The first patch sets a flag that isn't used by BFS so it was not necessary. The other changes to resched_best_mask are sound and the only thing they're missing is an equivalent optimisation for compiled in support for MC and SMT schedulers on hardware that doesn't have one and/or the other.
 So here it is:

BFS by itself:

3.15-ck1 patchset directory:



  1. I just going to package a new kernel, and suddenly I found BFS was updated. Thanks CK!

  2. Thank you very much for even maintaining your CK/BFS while on vacation. I hope, you'll still enjoy your time, there. Best wishes, Manuel Krause

  3. Thank you for the patch, have a nice time on vacation.

    Also, I have found a bug which leads to PID namespace leakage for tasks running in PID namespaces -- typically these are LXC containers. The problem is that after fork/clone, child would report incorrect PID. The fix (copied from CFS) and test program (should be run using lxc-unshare or in normal LXC container) are here:

    1. Thanks for that. Will incorporate on the next release.

  4. @ck
    Thanks for reviewing my changes. I should described them a little more detail.
    For the concern about compiled in support for MC and SMT schedulers on hardware that doesn't have one and/or the other, I guess you mean the removal of sole_cpu_idle(), here is my thought,
    1. Special needs for hardware can be improved by disabling MC/SMT in kernel config
    2. In order to optimize this, we have to call to a cheaper version or full version function via function pointer; if not, we can just use inline functions
    3. Compare the cheaper version and the full version functions, the cpumask_subset macro in the full version function for normal system(<=64 cpu/HT) is not that heavry and still acceptable.
    Based on the aboves, and consider function pointer call will minus the effect introduced by the cherper version, I choose to go this way.

    I have diff between my .447 port and .448, please look at get_nohz_timer_target(), should the "goto unlock;" be inside the block of "if (!idle_cpu(i))"? I notice this when I port .447 to 3.15 and sync with mainline. Seems that it's long existed in bfs.

    1. Yep that's a bug well spotted thanks.