Skip to contentSkip to conversation

page pre-swapping + moving it on cache-list

DISCUSSION Samium Gromoff 5 participants 6 messages Sep 6, 2001

lore
Share & tools
lore
#0 lore raw

Here is an idea i think i stole from Matthew Dillon`s paper.

Actually it sound more like we take some pages from the near 0
age and swapping them out but not throwing them away, but moving them from active list to cache. So that we can always throw them away at near null cost while shrinking the cache. This is like a replacement for swap-cache if i`m right here...

cheers,
Sam

#1 lore raw
Quoted 7 lines · Samium Gromoff

Here is an idea i think i stole from Matthew Dillon`s paper.

Actually it sound more like we take some pages from the near 0
age and swapping them out but not throwing them away, but moving them from active list to cache. So that we can always throw them away at near null cost while shrinking the cache. This is like a replacement for swap-cache if i`m right here...

This is called the "inactive_clean" list in Linux terminology. ;)

Rik

Signature · 5 lines
IA64: a worthy successor to i860.

http://www.surriel.com/		http://distro.conectiva.com/

Send all your spam to [email protected] (spam digging piggy)
#2 lore raw
Quoted 11 lines · On Thu, 6 Sep 2001 08:29:03 -0300 (BRST) Rik van Riel <[email protected]>…
Quoted 7 lines · Samium Gromoff

Here is an idea i think i stole from Matthew Dillon`s paper.

Actually it sound more like we take some pages from the near 0
age and swapping them out but not throwing them away, but moving them from active list to cache. So that we can always throw them away at near null cost while shrinking the cache. This is like a replacement for swap-cache if i`m right here...

This is called the "inactive_clean" list in Linux terminology. ;)

What's the use of an inactive_clean list anyway, or the effective difference between its members and the members of memfree (I suspect such a list from the output of /proc/meminfo)?
Besides the fact, that the splitting in two lists prevents proper defragmentation (if you have pages in two lists you are not driven to defrag at the point where you put them together in one).

Regards,
Stephan

#3 lore raw
Quoted 3 lines · Stephan von Krawczynski

What's the use of an inactive_clean list anyway, or the effective difference between its members and the members of memfree (I suspect such a list from the output of /proc/meminfo)?

Pages on the inactive_clean list contain data. Throwing away data when you can keep it in memory isn't the smartest thing.

Quoted 2 lines

Besides the fact, that the splitting in two lists prevents proper defragmentation

Patches to fix this thing while still allowing us to keep the data in memory for most pages are appreciated. Patches to the universe to give me more than 24 hours a day, too ;)

cheers,

Rik

Signature · 5 lines
IA64: a worthy successor to i860.

http://www.surriel.com/		http://distro.conectiva.com/

Send all your spam to [email protected] (spam digging piggy)
#4 lore raw

Stephan / Rik,

Quoted 9 lines · --On Thursday, September 06, 2001 10:05 AM -0300 Rik van Riel…

Pages on the inactive_clean list contain data. Throwing away data when you can keep it in memory isn't the smartest thing.

Quoted 2 lines

Besides the fact, that the splitting in two lists prevents proper defragmentation

Patches to fix this thing while still allowing us to keep the data in memory for most pages are appreciated.

It's not keeping it two lists that prevents proper defragmentation. It's having it allocated all around memory, and never freeing the pages which prevent coalescence of areas, and thus either throwing away the data, or garbage collecting, that prevents defragmentation. We never free these pages either because they sit in an idle system (with no memory pressure) in places like inactive_dirty, or in caches, or, in an active system, because they are direct_reclaim'd out of inactive_clean etc., so never get freed [1].

As this kind of garbage collection requires memcpy() etc., it might be harmless when the system is idle, but isn't going to be an attractive option when the system is busy thrashing away (though it might be possible to hueristically evict awkward pages preferentially, by aging them more harshly).

But before we go introducing tentacles of the buddy system into every part of the memory manager, I'd like to be satisfied we can't attempt to allocate and free stuff more intelligently in the first place.

I have some more ideas on this I shall code up tonight.

[1] though as disabling direct_reclaim entirely has NO measurable effect on fragmentation, fixing it is at best a necessary but not sufficient component of a fix). I haven't measured the effect of Roger L's patch in total.

--
Alex Bligh

#5 lore raw
Quoted 12 lines · Alex Bligh - linux-kernel

It's not keeping it two lists that prevents proper defragmentation. It's having it allocated all around memory, and never freeing the pages which prevent coalescence of areas, and thus either throwing away the data, or garbage collecting, that prevents defragmentation. We never free these pages either because they sit in an idle system (with no memory pressure) in places like inactive_dirty, or in caches, or, in an active system, because they are direct_reclaim'd out of inactive_clean etc., so never get freed [1].

Quoted 6 lines

As this kind of garbage collection requires memcpy() etc., it might be harmless when the system is idle, but isn't going to be an attractive option when the system is busy thrashing away (though it might be possible to hueristically evict awkward pages preferentially, by aging them more harshly).

The problem with thrashing, is it not, is that we're not making forward progress because we're waiting for swap--that is to say, thrashing *is* an idle state of sorts, and so might be an ideal opportunity for gc methods that require heavy CPU involvement. It's not as if there's anything better to do....

Signature · 1 line
/Jonathan Lundell.