lkml.org 
[lkml]   [2006]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Prevent large file writeback starvation
    On Mon, Feb 06, 2006 at 03:14:35PM -0800, Andrew Morton wrote:
    >
    > So to fix both these problems we need to be smarter about terminating the
    > wb_kupdate() loop. Something like "loop until no expired inodes have been
    > written".
    >
    > Wildly untested patch:

    > wbc.nr_to_write = MAX_WRITEBACK_PAGES;
    > + wbc.wrote_expired_inode = 0;
    > writeback_inodes(&wbc);
    > - if (wbc.nr_to_write > 0) {
    > + if (wbc.wrote_expired_inode == 0) {
    > if (wbc.encountered_congestion)
    > blk_congestion_wait(WRITE, HZ/10);
    > else

    FWIW, Theres a problem with the logic here - if we've encountered congestion,
    we want to wait even if we wrote back expired inodes. Should it be:

    if (!wbc.wrote_expired_inode && !wbc.encountered_congestion)
    break; /* All the old data is written */
    if (wbc.encountered_congestion)
    blk_congestion_wait(WRITE, HZ/10);


    Cheers,

    Dave.
    --
    Dave Chinner
    R&D Software Enginner
    SGI Australian Software Group
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-02-07 08:52    [W:0.036 / U:31.532 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site