lkml.org 
[lkml]   [1997]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Page cache and swapping

    > > 1. to the one saying qsort'ing mmaped file would be agood idea:
    > >
    > > if you qsort a file that does not fit in memory, your program
    > > is nearly broken - qsort has almost no locality, so you
    > > get what you deserve... slow performance. qsort is one
    > > of the worst sorting algorithms for this case.
    >
    > But it does fit in memory, at least if you are talking about the program
    > I posted.

    I have not tried your program yet, but looking at it I'm not sure it fits
    completely into memory. How much RAM does your machine have, and how big
    a file are you using?

    > I _think_ the problem is update (or whatever update calls) locks
    > all the pages when it tries to synchronzie the disk and memory images. If
    > this is what it going on it would be nice if the kernel would not try to
    > flush diry file pages if they had been accessed in the last second or so.

    Dirty file mmapped pages are only ever written back if the system calls
    try_to_swap_out, which happens only in low-memory situations. If your map
    really did fit into physical RAM, the data would never get written back
    until you unmap the file or exit the program.
    It could hit one of the filemap bugs when it unmaps the area and starts
    writing out the dirty pages, though.

    Bernd

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