linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Swapping anonymous pages
@ 2001-08-08 17:29 Keir Fraser
  2001-08-08 19:11 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Keir Fraser @ 2001-08-08 17:29 UTC (permalink / raw)
  To: linux-mm; +Cc: fraser

Hi,

Having spent some time reading the Linux VM code, I have a question
about the swap_out algorithm in vmscan.c. It seems to me that the outer
loop there is "backwards" -- the page tables of each address space are
scanned and mapped to physical pages, rather than scanning physical
pages and having a list of mappings of that page to be invalidated
when the page is swapped. 

This seems particularly strange when there is already infrastructure
for scanning physical pages in the LRU cache: why do extra work to
scan virtual address spaces as well? Seems to defeat one of the main
reasons for moving to a unified paging mechanism :)

The only reasons I can see for doing the current way are:
 * keeping the reverse (physical -> virtual) mappings would eat too
   much memory. 
 * since it's old (pre-2.4) code, perhaps noone has yet got round to
   rewriting it for the new design.

So, I'm curious to know which of the two it is (or whether the current
way was found to be "good enough").

 Best wishes,
 Keir Fraser
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-08 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-08 17:29 Swapping anonymous pages Keir Fraser
2001-08-08 19:11 ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox