More VM balancing issues..
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Christopher Zimmerman
No that didn't seem to help. In fact the machine(1GB) just froze after a while.
The 1GB case is actually the most interesting of all, because in the 1GB case you end up having a _really_ small "high memory" zone, I think (just a small zone that is comprised of the pages that can't be used in the normal memory area due to needing some kernel VM space etc).
Which means that the balancing probably gets rather interesting for that exact case.
Anyway, my patch was buggy - it made the per-zone "pages_high" depend on only the zone size, but still leaves the actual comparisons towards the "class" free pages count. Which just can't be right.
I'd like to try a "local decisions only" version of this, with no classes etc. That's the simplest case, and it's the only case that I'm reasonable confident cannot have any really strange behaviour due to pathologically small zones, etc.
Quoted 3 lines
I'm going to try out Konoj's patch next. I also tried it out on the 2GB box and got and immediate
highmem.coops. Maybe that oops hasn't been fully resolved. If it happens again I'll send you the info.
I'd sure like to see the oops. It may be that the strange balancing caused by the thinko in my patch (see above) actually causes a hidden bug somewhere to materialize.. I don't think the thinko itself should cause any oopses, just strange balancing behaviour.
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Oh, I found another problem: when the VM balancing was rewritten, the "pages_low" thing was still calculated, but nothing actually USED it.
So we had three water-marks: "enough for anything", "low on memory" and "critical".
And we somehow lost the "low on memory" and only used the "enough" and "critical" to do all comparisons.
Which makes for a _very_ choppy balance, and is definitely wrong.
The behaviour should be something like:
- whenever we dip below "low", we wake up kswapd. kswapd remains awake (for that zone) until we reach "enough".
- whenever we dip below "critical", we start doing synchronous memory freeing ourselves. We continue to do that until we reach "low" again (at which point kswapd will still continue in the background, but we don't depend on the synchronous freeing any more).
but for some time we appear to have gotten this wrong, and lost the "low" mark, and used the "critical" and "high" marks only.
Or maybe somebody did some testing and decided to disagree with the old three-level thing based on actual numbers? The only coding I've done has been based on "this is how I think it should work, and because I'm always right it's obviously the way it _should_ work". Which is not always the approach that gets the best results ;)
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Quoted 4 lines
Oh, I found another problem: when the VM balancing was rewritten, the "
pages_low" thing was still calculated, but nothing actually USED it.
2.3.50 did.
This is one of the things I pointed out in the recent balancing patch. The patch I sent to Christopher tries to fix it and go back to 2.3.50 bahavior.
Again, Documentation/vm/balance has comments about this which were true till 2.3.50.
AFAIR, Andrea put this stuff into 2.3, round about 2.3.40 or so timeframe.
Quoted 6 lines
So we had three water-marks: "enough for anything", "low on memory" and "critical".
And we somehow lost the "low on memory" and only used the "enough" and "critical" to do all comparisons.
This was also done properly in 2.3.50, and changed in the recent patch.
Maybe its time that tweaks to the balancing code get documented in Documentation/vm/balance. Its easier all around to keep track of what's happening.
Kanoj
Quoted 20 lines
Which makes for a _very_ choppy balance, and is definitely wrong.
The behaviour should be something like:
- whenever we dip below "low", we wake up kswapd. kswapd remains awake (for that zone) until we reach "enough".
- whenever we dip below "critical", we start doing synchronous memory freeing ourselves. We continue to do that until we reach "low" again (at which point kswapd will still continue in the background, but we don't depend on the synchronous freeing any more).but for some time we appear to have gotten this wrong, and lost the "low" mark, and used the "critical" and "high" marks only.
Or maybe somebody did some testing and decided to disagree with the old three-level thing based on actual numbers? The only coding I've done has been based on "this is how I think it should work, and because I'm always right it's obviously the way it _should_ work". Which is not always the approach that gets the best results ;)
Quoted 7 lines
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/