Re: Page cache and swapping

Jim Nance (jlnance@avanticorp.com)
Fri, 27 Jun 1997 18:56:40 -0400 (EDT)


> 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 _think_ the problem is update (or whatever update calls) locks
all the pages when 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.

I would love to have someone look at this and confirm/deny my hypothesis
though.

Thanks,

Jim