Re: mmap() versus read()

Marijn Meijles (marijn@stack.nl)
Mon, 9 Mar 1998 00:44:31 +0100


You wrote:
> >Why does Linux page executables from their original location? Isn't that
> >slower than putting it into the swapfile because you have to wade through the
> >filesystem layer when you need to page in? Or is the penalty for writing it
> >into the swap bigger than the filesystem overhead?
>
> Executables are demand paged (pages are not loaded in unless the
> application tries to execute code in the page). If we swapped out executable
> pages then we could have a situation where calling a subroutine in an
> application would cause the OS to run out of swap space and terminate it (not
> a good situation).
>
I agree demand paging is real handy, try running StarOffice 4.0 :), but
wouldn't it be possible to put executable pages in the swapfile and when
the need arises you can still discard them. That way you have the best of
both worlds. Of course you pay a penalty with a small swap, but harddisk
sizes are growing fast....

If you think I'm whining or if this is an old discussion, please tell me.

-- 
Marijn
---
There is a chance that today
is the first of May

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