Re: mmap() versus read()

Michael Lausch (mla@gams.co.at)
Wed, 11 Mar 1998 12:13:17 +0100


>>>>> "bh" == Benjamin C R LaHaise <blah@kvack.org>
>>>>> wrote the following on Tue, 10 Mar 1998 16:39:51 -0500 (EST)

bh> On Tue, 10 Mar 1998, Pavel Machek wrote:
bh> [context: paging executables from origin; why not swap?]
>> Ok. Is there easy way to change it? On my system, swap is order of
>> magnitude faster than disk. I would like linux to take advantage of
>> it.

bh> There isn't an easy way to change it right now, unless you want to give up
bh> the sharing of clean pages, which is a big loss. One option will be to
bh> take a swap backed inode (I'm using such beasts to replace the SysV shm
bh> objects) and use it to 'cache' the executable - this would be easy enough
bh> to accomplish, but could be a potentially heavy user of swap. It does
bh> have the benefit of also caching normal file access... (say, NFS ;-)

But the problem is when you are using Linux on embedded systems
without any swap (disk) at all. The programs are stored in the FLASH
RAM so the cost of reading a page from the executable is almost zero,
but using a swap area is impossible (no, we don't have 20 Meg RAM for
a RAM swap disk)

[deleted]

bh> -ben

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu