From: "Stephen C. Tweedie" <sct@redhat.com>
To: Rogier Wolff <R.E.Wolff@BitWizard.nl>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
"J . A . Magallon" <jamagallon@able.es>,
Wakko Warner <wakko@animx.eu.org>,
Xavier Bestel <xavier.bestel@free.fr>,
Goswin Brederlow <goswin.brederlow@student.uni-tuebingen.de>,
William T Wilson <fluffy@snurgle.org>,
Matt_Domsch@Dell.com, linux-kernel@vger.kernel.org
Subject: Re: 2.4 and 2GB swap partition limit
Date: Wed, 2 May 2001 12:04:03 +0100 [thread overview]
Message-ID: <20010502120403.G26638@redhat.com> (raw)
In-Reply-To: <20010501173558.U26638@redhat.com> <200105021054.MAA07283@cave.bitwizard.nl>
In-Reply-To: <200105021054.MAA07283@cave.bitwizard.nl>; from R.E.Wolff@BitWizard.nl on Wed, May 02, 2001 at 12:54:15PM +0200
Hi,
On Wed, May 02, 2001 at 12:54:15PM +0200, Rogier Wolff wrote:
>
> first: Thanks for clearing this up for me.
>
> So, there are in fact some more "states" a swap-page can be in:
>
> -(0) free
> -(1) allocated, not in mem.
> -(2) on swap, valid copy of memory.
> -(3) on swap: invalid copy, allocated for fragmentation, can
> be freed on demand if we are close to running out of swap.
>
> If we running low on (0) swap-pages we can first start to reap the (3)
> pages, and if that runs out, we can start reaping the (2)
> pages. Right?
Yes. However, there is other state to worry about too. Anonymous
pages are referenced from process page tables. As long as the page
tables are referring to the copy in memory, you can free up the copy
on disk. However, if any ptes point to the copy on disk, you cannot
(and remember, process forks can result in multiple process mm's
pointing to the same anonymous page, and some of those mm's may point
to swap while others point to the in-core page).
So the aim is more complex. Basically, once we are short on VM, we
want to eliminate redundant copies of swap data. That implies two
possible actions, not one --- we can either remove the swap page for
data which is already in memory, or we can remove the in-memory copy
of data which is already on swap. Which one is appropriate will
depend on whether the ptes in the system point to the swap entry or
the memory entry. If we have ptes pointing to both, then we cannot
free either.
Cheers,
Stephen
next prev parent reply other threads:[~2001-05-02 11:07 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-02 21:23 2.4 and 2GB swap partition limit Matt_Domsch
2001-03-02 23:52 ` Kenneth Johansson
2001-03-03 6:14 ` William T Wilson
2001-03-03 11:14 ` Rogier Wolff
2001-03-08 13:05 ` Goswin Brederlow
2001-04-27 10:51 ` Xavier Bestel
2001-04-27 11:13 ` Rogier Wolff
2001-04-27 20:52 ` LA Walsh
2001-04-27 21:44 ` Rik van Riel
2001-04-27 22:06 ` Thomas Dodd
2001-04-27 22:40 ` Hugh Dickins
2001-04-27 22:40 ` Rik van Riel
2001-04-29 15:12 ` Ingo Oeser
2001-04-27 22:44 ` LA Walsh
2001-04-28 7:47 ` Rogier Wolff
2001-04-27 22:22 ` Wakko Warner
2001-04-28 13:17 ` Rogier Wolff
2001-04-28 13:37 ` Wakko Warner
2001-04-28 14:11 ` Rogier Wolff
2001-04-28 14:28 ` J . A . Magallon
2001-04-30 18:12 ` Alan Cox
2001-05-01 13:00 ` Stephen C. Tweedie
2001-05-01 16:14 ` Rogier Wolff
2001-05-01 16:35 ` Stephen C. Tweedie
2001-05-02 10:54 ` Rogier Wolff
2001-05-02 11:04 ` Stephen C. Tweedie [this message]
2001-05-02 12:49 ` Hugh Dickins
2001-05-02 13:43 ` Stephen C. Tweedie
2001-05-02 0:28 ` Rik van Riel
2001-05-02 0:34 ` David S. Miller
2001-05-02 0:43 ` Rik van Riel
2001-05-02 1:14 ` Roger Larsson
2001-05-02 1:30 ` Rik van Riel
2001-05-01 13:39 ` Christoph Rohland
2001-05-01 23:25 ` Rik van Riel
2001-04-28 18:04 ` Albert D. Cahalan
2001-04-28 21:23 ` Rogier Wolff
2001-04-29 1:43 ` Jonathan Lundell
2001-04-29 9:17 ` Kenneth Johansson
2001-04-28 18:21 ` David Lang
2001-04-28 21:25 ` Rogier Wolff
2001-04-30 18:14 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2001-03-04 22:04 Matt_Domsch
2001-03-05 8:58 ` Christoph Rohland
2001-03-05 14:30 ` Rik van Riel
2001-03-05 14:36 ` Rik van Riel
2001-03-05 14:52 ` Matti Aarnio
2001-03-05 13:30 ` Christoph Hellwig
2001-03-05 16:53 Andries.Brouwer
2001-04-30 18:45 Torrey Hoffman
2001-04-30 19:04 ` Richard B. Johnson
2001-04-30 19:07 ` David S. Miller
2001-04-30 19:14 ` Richard B. Johnson
2001-04-30 21:04 ` Andreas Ferber
2001-05-02 14:31 ` Andi Kleen
2001-05-02 22:17 ` Andreas Dilger
2001-05-04 8:16 ` Andi Kleen
2001-05-03 14:04 Ishikawa
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=20010502120403.G26638@redhat.com \
--to=sct@redhat.com \
--cc=Matt_Domsch@Dell.com \
--cc=R.E.Wolff@BitWizard.nl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=fluffy@snurgle.org \
--cc=goswin.brederlow@student.uni-tuebingen.de \
--cc=jamagallon@able.es \
--cc=linux-kernel@vger.kernel.org \
--cc=wakko@animx.eu.org \
--cc=xavier.bestel@free.fr \
/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