tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mlock() issues



On Fri, 22 Oct 2010 05:54:48 -0400
Matthew Mondor <mm_lists%pulsar-zone.net@localhost> wrote:

> On Fri, 22 Oct 2010 10:18:52 +0100
> Sad Clouds <cryintothebluesky%googlemail.com@localhost> wrote:
> 
> > A pipelined request, say for 10 small files can be served with a
> > single writev() system call (provided those files are cached in
> > RAM), if you rely on kernel file cache, you need to issue 10 write
> > () system calls.
> 
> Is this also true if the 10 iovecs point to mmap(2)ed files/buffers
> which pages were recently accessed?

Well if you're allocating memory yourself, then you've just created your
own application cache. On the other hand if you mmap() those files
directly, what happens if another process truncates some of those files
while you're reading them?


Home | Main Index | Thread Index | Old Index