From: Keir Fraser <fraser@pa.dec.com>
To: linux-mm@kvack.org
Cc: fraser@pa.dec.com
Subject: Swapping anonymous pages
Date: Wed, 08 Aug 2001 10:29:57 -0700 [thread overview]
Message-ID: <200108081729.f78HTvY06100@srcintern6.pa.dec.com> (raw)
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/
next reply other threads:[~2001-08-08 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-08 17:29 Keir Fraser [this message]
2001-08-08 19:11 ` Rik van Riel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200108081729.f78HTvY06100@srcintern6.pa.dec.com \
--to=fraser@pa.dec.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox