[Top][All Lists]

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

Re: slow access to files

From: Niels Möller
Subject: Re: slow access to files
Date: 06 Nov 2001 22:04:34 +0100

Diego Roversi <diegor@tiscalinet.it> writes:

> I think that storeio is the only possibility to put a cache mechanism in
> user space. But I see some drawbacks:
> - memory user for caching can be paged out 

If that happens, you're doing it wrong, I think. You want to use a
special pager for the cache. When the kernel tells the pager to page
out a page in your cache (my understanding of the details on how this
happens is very vague), you don't want to write it to the swap, you
can just throw it away, and reread it from the original location when
it is accessed the next time (ok, that's for read-only access, but
that's the simplest case).

And that's exactly what mmap is supposed to do. I'm not sure what
parts of mmap are done in Mach and how much of it is done in various
hurd components, but I hope you can reuse or at least learn from that

On the other hand, AFAIK, ext2fs *is* already mmapping the entire
device (that's the source of the current limit on partition size), so
I don't know why we're having this problem. Perhaps the general
mmapping mechanisms can be improved to cache better?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]