From: "David S. Miller" <davem@redhat.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
"J . A . Magallon" <jamagallon@able.es>,
Rogier Wolff <R.E.Wolff@BitWizard.nl>,
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: Tue, 1 May 2001 17:34:28 -0700 (PDT) [thread overview]
Message-ID: <15087.22036.811357.526981@pizda.ninka.net> (raw)
In-Reply-To: <Pine.LNX.4.21.0105012119110.19012-100000@imladris.rielhome.conectiva>
In-Reply-To: <20010501140003.A28747@redhat.com> <Pine.LNX.4.21.0105012119110.19012-100000@imladris.rielhome.conectiva>
Rik van Riel writes:
> Then we will be scanning through memory looking for something to
> swap out (otherwise we'd not be in need of swap space, right?).
> At this point we can simply free up swap entries while scanning
> through memory looking for stuff to swap out.
Sounds a lot like my patch I posted a few weeks ago:
--- mm/vmscan.c.~1~ Wed Apr 11 19:05:59 2001
+++ mm/vmscan.c Thu Apr 12 17:19:51 2001
@@ -441,8 +441,14 @@
maxscan = nr_inactive_dirty_pages;
while ((page_lru = inactive_dirty_list.prev) != &inactive_dirty_list &&
maxscan-- > 0) {
+ int dead_swap_page;
+
page = list_entry(page_lru, struct page, lru);
+ dead_swap_page =
+ (PageSwapCache(page) &&
+ page_count(page) == (1 + !!page->buffers));
+
/* Wrong page on list?! (list corruption, should not happen) */
if (!PageInactiveDirty(page)) {
printk("VM: page_launder, wrong page on list.\n");
@@ -453,9 +459,10 @@
}
/* Page is or was in use? Move it to the active list. */
- if (PageTestandClearReferenced(page) || page->age > 0 ||
- (!page->buffers && page_count(page) > 1) ||
- page_ramdisk(page)) {
+ if (!dead_swap_page &&
+ (PageTestandClearReferenced(page) || page->age > 0 ||
+ (!page->buffers && page_count(page) > 1) ||
+ page_ramdisk(page))) {
del_page_from_inactive_dirty_list(page);
add_page_to_active_list(page);
continue;
@@ -481,8 +488,11 @@
if (!writepage)
goto page_active;
- /* First time through? Move it to the back of the list */
- if (!launder_loop) {
+ /* First time through? Move it to the back of the list,
+ * but not if it is a dead swap page. We want to reap
+ * those as fast as possible.
+ */
+ if (!launder_loop && !dead_swap_page) {
list_del(page_lru);
list_add(page_lru, &inactive_dirty_list);
UnlockPage(page);
next prev parent reply other threads:[~2001-05-02 0:34 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-02 21:23 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
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 [this message]
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
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=15087.22036.811357.526981@pizda.ninka.net \
--to=davem@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=riel@conectiva.com.br \
--cc=sct@redhat.com \
--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
all inboxes | Powered by JetHome®