lkml.org 
[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Linux 2.6.29
    Linus Torvalds wrote:
    >
    > On Thu, 2 Apr 2009, Linus Torvalds wrote:
    >> On Thu, 2 Apr 2009, Andrew Morton wrote:
    >>> A suitable design for the streaming might be, every 4MB:
    >>>
    >>> - run sync_file_range(SYNC_FILE_RANGE_WRITE) to get the 4MB underway
    >>> to the disk
    >>>
    >>> - run fadvise(POSIX_FADV_DONTNEED) against the previous 4MB to
    >>> discard it from pagecache.
    >> Here's an example. I call it "overwrite.c" for obvious reasons.
    >
    > Oh, except my example doesn't do the fadvise. Instead, I make sure to
    > throttle the writes and the old range with
    >
    > SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER
    >
    > which makes sure that the old pages are easily dropped by the VM - and
    > they will be, since they end up always being on the cold list.

    Dumb VM question, then: I understand the logic behind the
    write-throttling part (some of my own userland code does something
    similar), but,

    Does this imply adding fadvise to your overwrite.c example is (a) not
    noticable, (b) potentially less efficient, (c) potentially more efficient?

    Or IOW, does fadvise purely put pages on the cold list as your
    sync_file_range incantation does, or something different?

    Thanks,

    Jeff, who is already using sync_file_range in
    some server-esque userland projects




    \
     
     \ /
      Last update: 2009-04-03 00:13    [W:2.426 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site