From: Andrew Morton <akpm@osdl.org>
To: Sean Neakums <sneakums@zork.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.6.7
Date: Thu, 17 Jun 2004 21:36:19 -0700 [thread overview]
Message-ID: <20040617213619.7f0b5b89.akpm@osdl.org> (raw)
In-Reply-To: <6uisdqryyt.fsf@zork.zork.net>
Sean Neakums <sneakums@zork.net> wrote:
>
> The 2.6.7 I built seems kind of swap-happy, apparently triggered by an
> overnight updatedb run. I think this also happened with
> 2.6.7-rc3-mm2.
There were corrections to logic errors in the vm scanner which will cause
increased pageout.
> I can't seem to find anything particularly out of the
> ordinary in the information below. I started off with swappiness set
> to 50 as I have for a while and dropped it twice by ten each time
> after a swapoff/swapon. It starts paging stuff out again pretty fast
> after it gets the swap back. Swap is is a dm-crypt device map.
swapoff/swapon doesn't do what you think it does. The pages are read from
the swap device, have the ptes reattached but the pages are placed on the
inactive list, from where they will be swapped out again very easily after
a swapon.
Which is really the correct behaviour: if these pages were earlier swapped
out then clearly they are the right ones to swap out when swap again
becomes available.
But that doesn't seem very important, and the old swapoff/swapon trick is
useful, so...
--- 25/mm/swapfile.c~swapoff-activate-pages 2004-06-17 21:27:41.704568280 -0700
+++ 25-akpm/mm/swapfile.c 2004-06-17 21:28:35.417402688 -0700
@@ -467,6 +467,13 @@ static unsigned long unuse_pmd(struct vm
if (unlikely(pte_same(*pte, swp_pte))) {
unuse_pte(vma, offset + address, pte, entry, page);
pte_unmap(pte);
+
+ /*
+ * Move the page to the active list so it is not
+ * immediately swapped out again after swapon.
+ */
+ activate_page(page);
+
/* add 1 since address may be 0 */
return 1 + offset + address;
}
_
next prev parent reply other threads:[~2004-06-18 4:37 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-16 5:56 Linux 2.6.7 Linus Torvalds
2004-06-16 6:58 ` Kalin KOZHUHAROV
2004-06-16 14:56 ` Jesper Juhl
2004-06-16 7:10 ` Jan De Luyck
2004-06-16 8:07 ` JFS compilation fix [was Re: Linux 2.6.7] Tomas Szepe
2004-06-16 12:55 ` Dave Kleikamp
2004-06-16 12:59 ` Dave Kleikamp
2004-06-16 13:05 ` Tomas Szepe
2004-06-16 9:58 ` Linux 2.6.7 (stty rows 50 columns 140 reports : No such device or address) Zilvinas Valinskas
2004-06-16 12:55 ` Jeff Garzik
2004-06-16 13:56 ` Benjamin Herrenschmidt
2004-06-16 16:38 ` jsimmons
2004-06-16 16:38 ` jsimmons
2004-06-16 14:17 ` Zilvinas Valinskas
2004-06-16 16:37 ` jsimmons
2004-06-16 16:37 ` jsimmons
2004-06-16 21:17 ` Egmont Koblinger
2004-06-16 21:17 ` Egmont Koblinger
2004-06-16 21:45 ` jsimmons
2004-06-16 21:45 ` jsimmons
2004-06-16 11:13 ` Linux 2.6.7 Tomas Szepe
2004-06-16 12:18 ` viro
2004-06-17 6:56 ` Tomas Szepe
2004-06-16 13:27 ` Linux 2.6.7 - problem with old gcc Eyal Lebedinsky
2004-06-16 16:09 ` Linux 2.6.7 (compile stats) John Cherry
2004-06-16 16:31 ` Linux 2.6.7 Dominik Karall
2004-06-16 18:53 ` Jeff Garzik
2004-06-16 17:42 ` Linux 2.6.7 - ACPI still broken Thomas Zehetbauer
2004-06-17 4:15 ` Kevin P. Fleming
2004-06-17 15:22 ` Linux 2.6.7 Sean Neakums
2004-06-18 4:36 ` Andrew Morton [this message]
2004-06-18 16:37 ` 2.6.7 Samba OOPS (in smb_readdir) Brice Goglin
2004-06-18 16:41 ` Brice Goglin
2004-06-18 17:11 ` Zwane Mwaikambo
2004-06-18 19:00 ` Christophe Saout
2004-06-18 19:22 ` Christophe Saout
2004-06-18 19:52 ` Zwane Mwaikambo
2004-06-19 20:35 ` Zwane Mwaikambo
2004-06-19 20:49 ` Zwane Mwaikambo
2004-06-19 20:52 ` Christophe Saout
2004-06-20 0:27 ` Zwane Mwaikambo
2004-06-20 0:28 ` Christophe Saout
2004-06-20 0:36 ` Zwane Mwaikambo
2004-06-20 0:40 ` Christophe Saout
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=20040617213619.7f0b5b89.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sneakums@zork.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.