Skip to contentSkip to conversation

nice vmm test case

DISCUSSION Benjamin Redelings 3 participants 4 messages Jul 5, 2000 – Jul 7, 2000 Memory management

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

Anyway, the swap_cnt in vmscan.c looks suspicious, maybe it's initiliazed too high?

The swap_cnt in vmscan.c is almost meaningless. It is basically the number of pages in a process that have not been scanned in the current iteration. (where one iteration means that we scan all processes).

However, as (I think) John Fremlin has pointed out, sorting processes to swap by this value is pointless.

vmscan.c goes through all the pages (at least on my machine) pretty fast, and that not all pages are found on the first iteration. If that were NOT the case we would be in BIG trouble, because it would never scan small processes until all the big ones had been scanned. Also, swap_cnt is not update when the RSS changes...
This indicates that John's patch should be worth trying out...

We are eagerly awaiting patches for active/inactive lists :) :)

-BenRI
P.S. Please correct me if I'm wrong...
--
"For nature does not give virtue,
It is an art to become good." - Seneca
Benjamin Redelings I <>< http://www.bol.ucla.edu/~bredelin
--
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/

#1 lore raw

Hi,

Quoted 5 lines

vmscan.c goes through all the pages (at least on my machine) pretty fast, and that not all pages are found on the first iteration. If that were NOT the case we would be in BIG trouble, because it would never scan small processes until all the big ones had been scanned. Also, swap_cnt is not update when the RSS changes...

I'm not talking about the scanning speed. What I'm seeing is that vi continuously touches it pages, but as soon as _some_ pages are needed, _all_ pages are swapped out. An operation that took a few minutes before, takes now several hours (hmm, maybe days... the test that I started on 2.2 yesterday still isn't finished :( ).

bye, Roman
--
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/

#2 lore raw
In reply to Benjamin Redelings
Quoted 2 lines · Benjamin Redelings
Quoted 2 lines

Anyway, the swap_cnt in vmscan.c looks suspicious, maybe it's initiliazed too high?

Perhaps, but I think the cause of the problem might well the priority argument to the swap_out function. For me, it is always set to around 62, so that the swap out loop is executed a ridiculous number of times, i.e. until all memory that can be is swapped out (which seems to be the behaviour described). You might like to force the counter to a sensible number (say 100) by editing the source. If you're not confortable with that, I can try to run off my current patch. (I'm not sure if I posted it or not).

[...]

Signature · 5 lines
	http://web.onetel.net.uk/~elephant/john
--
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/
#3 lore raw

Hi,

Quoted 5 lines · John Fremlin

Perhaps, but I think the cause of the problem might well the priority argument to the swap_out function. For me, it is always set to around 62, so that the swap out loop is executed a ridiculous number of times, i.e. until all memory that can be is swapped out (which seems to be the behaviour described).

Hmm, for me it looks like that even in a single loop too much is done. A single loop already tries to put as much as possible into the swap cache. Two calls of swap_out_mm for the same mm in very short time and most of the process is on swap and it will only be busy to get it pages back.

bye, Roman
--
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/