[lkml]   [2007]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] cache pipe buf page address for non-highmem arch
    On Thu, Mar 22, 2007 at 05:51:11PM -0700, Ken Chen wrote:
    > It is really sad that we always call kmap and friends for every pipe
    > buffer page on 64-bit arch that doesn't use HIGHMEM, or on
    > configuration that doesn't turn on HIGHMEM.
    > The effect of calling kmap* is visible in the execution profile when
    > pipe code is being stressed. It is especially true on amd's x86-64
    > platform where kmap() has to traverse through numa node index
    > calculation in order to convert struct page * to kernel virtual
    > address. It is fairly pointless to perform that calculation repeatly
    > on system with no highmem (i.e., 64-bit arch like x86-64). This patch
    > caches kernel pipe buffer page's kernel vaddr to speed up pipe buffer
    > mapping functions.
    > There is another suboptimal block in pipe_read() where wake_up is
    > called twice. I think it was an oversight since in pipe_write(), it
    > looks like it is doing the right thing.

    I think you're fixing the symptom here and not the cause. If calculating
    the virtual address of a page is so expensive on your setup it should
    define WANT_PAGE_VIRTUAL and we should always cache the virtual address
    in struct page. There's a lot more code, epecially in filesystems that's
    rather upset about a slow page_address.

    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-23 11:19    [W:0.041 / U:5.404 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site