> No, it's not necessarily doing the Right Thing. The trouble is that
> there is no balancing between swapping and emptying the page cache.
I've still got some Digital Unix-like balancing code
lying around...
Basically, you can set 3 values for the buffer/page
cache, a minimum value, a maximum value and a steal
value. When the buffer/page memory is above steal
level and the system needs memory, it'll steal memory
from the page cache first. A good default would be
25% of main memory. Of course, these values will be
sysctl controllable (we still got 8 unused variables
in swap_control ;-).
> Now, once we've got a single pass which can scavenge BOTH page cache
> and swap pages, then we're really going to be cooking on gas. :) For
I think we should just copy DU's scheme:
- when buffer/page cache is above steal level, we steal that memory
- otherwise, we steal in a round-robin fashion from both
> now, however, all we're doing is tweaking what is a very very delicate
> balance, and as we proved in the 1.2.4 and 1.2.5 swapping disasters,
> getting such a change done in a way which doesn't make at least
> somebody's performance very much worse is really quite hard to do in
> the current way of managing memory. When I was doing the first round
> of work on kswap, it was this balance between cache and swap which was
> the biggest problem, not the aging of individual pages from either
> source.
That's why we have sysctl controllable swapping. And now
we're talking about it, the sysctl really needs updating
too...
You can expect these patches RSN (maybe even tomorrow).
grtz,
Rik.
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page | Scouting webmaster |
| - kswapd ask-him & complain-to guy | Vries cubscout leader |
| http://www.fys.ruu.nl/~riel/ | <H.H.vanRiel@fys.ruu.nl> |
+-------------------------------------------+--------------------------+
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu