lkml.org 
[lkml]   [2004]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectSOLVED: Performance drop 2.6.0-test7 -> 2.6.1-rc2
    Jan Kasprzak wrote:
    : Yesterday I have upgraded the kernel on my FTP server to 2.6.1-rc2
    : (from 2.6.0-test7) and today I have found the server struggling under
    : load average of 40+ and the system was barely usable. The main load on the
    : server is ProFTPd serving mainly ISO 9660 images using sendfile().

    For archives: Andrew Morton suggested to apply the following patch
    to mm/filemap.c (which in fact reverts part of the patch-2.6.1), and this
    solved the problem (bigger-than-needed read ahead when doing sendfile()
    of large files). 2.6.1 with this patch works for me now. Thanks!

    -Yenya

    diff -puN mm/filemap.c~readahead-partial-backout mm/filemap.c
    --- 25/mm/filemap.c~readahead-partial-backout 2004-01-09 22:19:32.000000000 -0800
    +++ 25-akpm/mm/filemap.c 2004-01-09 22:19:32.000000000 -0800
    @@ -587,22 +587,13 @@ void do_generic_mapping_read(struct addr
    read_actor_t actor)
    {
    struct inode *inode = mapping->host;
    - unsigned long index, offset, last;
    + unsigned long index, offset;
    struct page *cached_page;
    int error;

    cached_page = NULL;
    index = *ppos >> PAGE_CACHE_SHIFT;
    offset = *ppos & ~PAGE_CACHE_MASK;
    - last = (*ppos + desc->count) >> PAGE_CACHE_SHIFT;
    -
    - /*
    - * Let the readahead logic know upfront about all
    - * the pages we'll need to satisfy this request
    - */
    - for (; index < last; index++)
    - page_cache_readahead(mapping, ra, filp, index);
    - index = *ppos >> PAGE_CACHE_SHIFT;

    for (;;) {
    struct page *page;
    @@ -621,6 +612,7 @@ void do_generic_mapping_read(struct addr
    }

    cond_resched();
    + page_cache_readahead(mapping, ra, filp, index);

    nr = nr - offset;
    find_page:
    _

    --
    | Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
    | GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
    | http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
    | I actually have a lot of admiration and respect for the PATA knowledge |
    | embedded in drivers/ide. But I would never call it pretty:) -Jeff Garzik |
    -
    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: 2005-03-22 14:00    [W:0.023 / U:59.536 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site