[lkml]   [2007]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 6/8] balance dirty pages from loop device
    From: Miklos Szeredi <>

    The function do_lo_send_aops() should call
    balance_dirty_pages_ratelimited() after each page similarly to

    Without this, writing the loop device directly (not through a
    filesystem) is very slow, and also slows the whole system down,
    because nr_dirty is constantly over the limit.

    Beware: this patch without the fix to balance_dirty_pages() makes a
    loopback mounted filesystem prone to deadlock.

    Signed-off-by: Miklos Szeredi <>

    Index: linux/drivers/block/loop.c
    --- linux.orig/drivers/block/loop.c 2007-02-27 14:40:55.000000000 +0100
    +++ linux/drivers/block/loop.c 2007-02-27 14:41:08.000000000 +0100
    @@ -275,6 +275,8 @@ static int do_lo_send_aops(struct loop_d
    pos += size;
    + balance_dirty_pages_ratelimited(mapping);
    + cond_resched();
    ret = 0;
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-03-06 19:13    [W:0.035 / U:29.808 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site