* 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
* Re: Swapping anonymous pages
2001-08-08 17:29 Swapping anonymous pages Keir Fraser
@ 2001-08-08 19:11 ` Rik van Riel
0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2001-08-08 19:11 UTC (permalink / raw)
To: Keir Fraser; +Cc: linux-mm
On Wed, 8 Aug 2001, Keir Fraser wrote:
> 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").
Both ;)
Even without the reverse mapping overhead (8 bytes per
pte for shared pages in my current implementation) we
have FAR too much pagetable overhead on large memory
machines anyway.
This means we need to support 2MB / 4MB pages, after
which the point about reverse mappings being too much
overhead pretty much becomes moot...
I'm planning to implement some of this stuff for 2.5.
regards,
Rik
--
IA64: a worthy successor to the i860.
http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com/
--
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