lkml.org 
[lkml]   [2002]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Pages swapped out even when free memory available...
From
Date
Am Die, 2002-08-20 um 12.28 schrieb Jan Hudec:

> Don't do it. In user-land, you simply don't have the info kernel does.
> Gimp tries to do things like this and results are truly horrible.
> It forces machine in deep swap if you set the cache large, while with
> small cache the actual size does not matter much as kernel takes care of
> the real caching.

> You should rather open a file you want to swap in, mmap it and only keep
> minimum data in other memory. Only reason to do even this may be, that
> the data may get too large to fit in swap. For all other reasons you
> should just let kernel do it's work.

Interesting you mention it. A week ago I started a thread exactly for
that reason; I implemented GIMPs tilemanagement using mmap but
unfortunately the performance sucks even more than GIMPs "clever"
swapping. That having said it has at least one more severe disadvantage:
The maximum amount of mmapable memory is far less than the maximum
filesize with large file support.

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