lkml.org 
[lkml]   [2010]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 25/35] btrfs: lower the dirty balacing rate limit
    Call balance_dirty_pages_ratelimit_nr() on every 16 pages dirtied.

    Experiments show that larger intervals (in the original code) can
    easily make the bdi dirty limit exceeded on 100 concurrent dd.

    CC: Chris Mason <chris.mason@oracle.com>
    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
    ---
    fs/btrfs/file.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    --- linux-next.orig/fs/btrfs/file.c 2010-12-13 21:46:19.000000000 +0800
    +++ linux-next/fs/btrfs/file.c 2010-12-13 21:46:20.000000000 +0800
    @@ -924,9 +924,8 @@ static ssize_t btrfs_file_aio_write(stru
    }

    iov_iter_init(&i, iov, nr_segs, count, num_written);
    - nrptrs = min((iov_iter_count(&i) + PAGE_CACHE_SIZE - 1) /
    - PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /
    - (sizeof(struct page *)));
    + nrptrs = min(DIV_ROUND_UP(iov_iter_count(&i), PAGE_CACHE_SIZE),
    + min(16UL, PAGE_CACHE_SIZE / (sizeof(struct page *))));
    pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL);

    /* generic_write_checks can change our pos */



    \
     
     \ /
      Last update: 2010-12-13 16:39    [W:4.416 / U:26.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site