lkml.org 
[lkml]   [2003]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How do I make this thing stop laging? Reboot? Sounds like Windows!
From
Date
On Wed, 2003-06-18 at 11:23, Anders Karlsson wrote:
> AIX uses (or used to use) the exact same way of reading/writing data
> from/to disk for all I/O. AIX also makes a distinction between code and
> data. If code in RAM is unused, it simply gets flushed. If it is needed
> again at a later time, it is paged in from disk where it was originally
> loaded from. Only dirty data is paged out into swap.
>
> Is it feasible to tweak the Linux VM to behave in the same fashion? If
> Linux already does it this way, I'll just shut up. :)

The distinction in Linux is between anonymous and file-backed mappings.
Executables are file mappings so the pages can just be dropped and they
will be read in from the backing file when needed again. This also holds
true for memory mapped files.

When a mapping has no file (anonymous) then the swap is used. This is
one of the reasons I like mmap() it means you dont end up using swap for
storing buffers containing bits of files which are on disk anyway.

--
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/gianni-at-ecsc.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.042 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site