Monday 14 February 2011

2.6.37-ck2 minor fixes.

I've put up a small updated -ck version for 2.6.37. There are only 2 changes: 1. The build fix for it not compiling with CPU HOTPLUG disabled, and 2. I've dropped the patch called mm-make_swappiness_really_mean_it.patch . This second patch broke a while back and I never noticed because I had swap disabled, sorry. It works better with it disabled. Note that the ubuntu packages I recently made available include this change which I quietly snuck in, but I will make ck2 packages officially available just to avoid confusion ;) If you've built your own 2.6.37-ck1 then I recommend upgrading only if you have swap enabled on your machine (which most people still do). Alternatively if you built it with CPU_HOTPLUG enabled just to make it build, then you _can_ upgrade to this version to build with it disabled but you won't notice a difference with the feature disabled - your kernel will only be slightly smaller. It might be a few nanoseconds faster..

Get it here:
2.6.37-ck2

28 comments:

  1. Any chance you can backport this to 2.6.32?

    http://ck.kolivas.org/patches/bfs/.6.32

    ReplyDelete
  2. I've always wondered about swap. I remember reading on LKML that the kernel really works better with swap enabled, even if it's just "dummy" swap like, say, 20MB swap (or whatever is the minimum possible.) In other words, instead of disabling it, it's better to just make it tiny instead.

    Is there any truth to this?

    ReplyDelete
  3. I'd consider that a bug rather than a feature. However if you're not using swap for hibernating images on a laptop, then I recommend you make the swap size proportional to your HARD DRIVE SPEED, not proportional to your RAM.

    ReplyDelete
  4. Btw, the link you have at the bottom is for .36, not .37.

    ReplyDelete
  5. Hi ck, what do you think about ulatencyd ( https://github.com/poelzi/ulatencyd/wiki/How-does-it-work ), could it have some influences to BFS?

    CU sysitos

    ReplyDelete
  6. That uses CGROUPS features which aren't supported on BFS. I don't particularly like anything that changes behaviour of applications AFTER they've started, especially if it involves running yet another daemon. I think they should start the desired way to begin with. See my toolsched scripts for what I mean.

    ReplyDelete
  7. Hi ck, which I/O scheduler do you use on your desktop?

    ReplyDelete
  8. I use CFQ. While I have toyed with the idea of writing my own I/O scheduler, the fact is I know little to nothing about that area. The main reason I use CFQ is it supports read priority levels. I really really really wish it would support write priority levels, but I know how expensive that would be to do. As for how happy I am with it, I'd say not very, but the alternatives that have come and gone have not really proven themselves.

    ReplyDelete
  9. hello, Con have You been checking reported (by me) problem of loss of performance on the multithreaded processor 330, eg an atom?

    Greetings

    Tomek

    ReplyDelete
  10. Hi. I have no lead on what exactly the performance drop is, and I don't have an atom processor so I don't know where to begin. If you could at least tell me what BFS version it started at, I might get a clue.

    ReplyDelete
  11. 2.6.37.1 broke the vmscan patch. I manually edited mm/vmscan.c as shown below. I hope this is the correct fix?

    @@ -2494,7 +2530,9 @@
    pgdat = zone->zone_pgdat;
    if (pgdat->kswapd_max_order < order)
    pgdat->kswapd_max_order = order;
    - if (!waitqueue_active(&pgdat->kswapd_wait))
    + active = waitqueue_active(&pgdat->kswapd_wait);
    + set_kswapd_nice(pgdat->kswapd, active);
    + if (!active)
    return;
    if (zone_watermark_ok_safe(zone, order, low_wmark_pages(zone), 0, 0))
    return;

    ReplyDelete
  12. Oops, it also broke the BFS patch. I guess that's more serious than the vmscan patch :-D

    In file included from kernel/sched.c:2:0:
    kernel/sched_bfs.c:3376:1: error: conflicting types for 'wait_for_completion_interruptible_timeout'
    include/linux/completion.h:84:13: note: previous declaration of 'wait_for_completion_interruptible_timeout' was here
    kernel/sched_bfs.c:3381:1: error: conflicting types for 'wait_for_completion_interruptible_timeout'
    include/linux/completion.h:84:13: note: previous declaration of 'wait_for_completion_interruptible_timeout' was here
    kernel/sched_bfs.c:3409:1: error: conflicting types for 'wait_for_completion_killable_timeout'
    include/linux/completion.h:86:13: note: previous declaration of 'wait_for_completion_killable_timeout' was here
    kernel/sched_bfs.c:3414:1: error: conflicting types for 'wait_for_completion_killable_timeout'
    include/linux/completion.h:86:13: note: previous declaration of 'wait_for_completion_killable_timeout' was here

    ReplyDelete
  13. @RealNC:

    ---
    kernel/sched_bfs.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    Index: linux-2.6.37.1/kernel/sched_bfs.c
    ===================================================================
    --- linux-2.6.37.1.orig/kernel/sched_bfs.c 2011-02-18 02:46:04.112028448 +0100
    +++ linux-2.6.37.1/kernel/sched_bfs.c 2011-02-18 02:49:28.232771746 +0100
    @@ -3342,7 +3342,7 @@ EXPORT_SYMBOL(wait_for_completion_interr
    * This waits for either a completion of a specific task to be signaled or for a
    * specified timeout to expire. It is interruptible. The timeout is in jiffies.
    */
    -unsigned long __sched
    +long __sched
    wait_for_completion_interruptible_timeout(struct completion *x,
    unsigned long timeout)
    {
    @@ -3375,7 +3375,7 @@ EXPORT_SYMBOL(wait_for_completion_killab
    * signaled or for a specified timeout to expire. It can be
    * interrupted by a kill signal. The timeout is in jiffies.
    */
    -unsigned long __sched
    +long __sched
    wait_for_completion_killable_timeout(struct completion *x,
    unsigned long timeout)
    {

    ReplyDelete
  14. Running your 2.6.37 ubuntu packages now.
    It seemed to need update-initramfs and update-grub.

    Latencywise it's similar to CFS, on the mainboard ALC888 soundchips. (1ms seems quite glitch-free, on my core2duo 2.5ghz, running normal threads.)

    Unfortunately I can't test my professional soundcard, since it depends on components related to the old firewire stack. Earlier tests (2.6.33) has shown that latency was stabler with a bit lower latencysettings, on the professional soundcard, than mainline.

    ReplyDelete
  15. Hello ck, in a previous response to a comment you told you use CFQ as your desktop I/O scheduler. Have you tried BFQ [1]? If so, could you tell us what is your opinion on it?

    [1]: http://algo.ing.unimo.it/people/paolo/disk_sched/

    ReplyDelete
  16. I've heard a lot about BFQ, but I haven't tried it.

    ReplyDelete
  17. Con, resuming triggers a warning inside try_to_wake_up_local right here:

    WARN_ON(rq != this_rq());

    I am using a slightly modified bfs on top of 2.6.37.2. Should I be afraid of bfs deleting all my porn?

    ReplyDelete
  18. All -ck patches have inbuilt pr0n protection. The last thing on earth they'd do is delete pr0n. The warn annoys the crap out of me, and I'm sure the code itself is flaky that calls it (i.e., not BFS), but I can't prove it. Just ignore it if everything else is ok.

    ReplyDelete
  19. Hi con,

    any chance to get a -ck2 for 2.6.37.2? Had some trouble to compile it and the patches from above doesn't work here.

    Btw, another scheduler: http://lwn.net/Articles/422333/
    The QFQ, any comments from a scheduler guru?

    Thanks sysitos.

    ReplyDelete
  20. To me and con,

    Sorry, my fault. It seems, that the QFQ is a traffic scheduler only for network packets, not designed as CPU scheduler.

    CU sysitos

    ReplyDelete
  21. @Mike - Sorry I can't keep re-syncing whenever they break -ck on the 4 point releases. It just ends up being too much work so I have to limit myself to 3 point releases.

    ReplyDelete
  22. re-sync please. You can do it! :D

    ReplyDelete
  23. Hi ck,

    no problem so far. It seems, that the team from the ZEN kernel do the sync work for you ;) They do even have other tweaks like the BFQ and SLQB. Nice to test. Hoped, that my load values (0,10) from the times of the 2.6.32/4 kernel times went back, but I am still with >0,60. But I shouldn't see only the values. If the computer does always react quickly, it should be enough ;)

    CU sysitos

    PS: Somebody a hint, how can I determine, which program does the high load or the load jump. With top I doesn't see an app which is eating my CPU. Firefox is at 10% and the others nearly 1%.

    ReplyDelete
  24. recently, I ran ck kernel with 100HZ on my virtual machine server. I noticed a situation. the file system throughput in 2.6.37.3-ck was lower than standard kernel while copying the vm image to do backup. in standard kernel, the throughput is near 100MB/s but 80MB/s in ck kernel. Does anyone meet it, too?

    ReplyDelete
  25. Yes that's intentional. If you read the comment at the top of the patch called mm-decrease_default_dirty_ratio.patch in the ck patchset you'll see that's done to improve latency under I/O load.

    ReplyDelete
  26. Thanks, ck, I'll try to tune it! Are there any suggestion to a normal virtual machine server?

    ReplyDelete