From: Christoph Lameter <clameter@sgi.com>
To: akpm@osdl.org
Cc: lhms-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
Christoph Lameter <clameter@sgi.com>, Cliff Wickman <cpw@sgi.com>
Subject: [PATCH 2/7] Swap Migration: Consolidate successful migration handling
Date: Mon, 28 Nov 2005 12:42:54 -0800 (PST) [thread overview]
Message-ID: <20051128204254.10037.17837.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20051128204244.10037.43868.sendpatchset@schroedinger.engr.sgi.com>
SwapMig: consolidate successful migration handling
Handle the moving of migrated pages to the "moved" list in a common branch
for rc == 0.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.15-rc2-mm1/mm/vmscan.c
===================================================================
--- linux-2.6.15-rc2-mm1.orig/mm/vmscan.c 2005-11-28 11:23:45.000000000 -0800
+++ linux-2.6.15-rc2-mm1/mm/vmscan.c 2005-11-28 11:25:14.000000000 -0800
@@ -702,11 +702,11 @@ redo:
list_for_each_entry_safe(page, page2, from, lru) {
cond_resched();
- if (page_count(page) == 1) {
+ rc = 0;
+ if (page_count(page) == 1)
/* page was freed from under us. So we are done. */
- list_move(&page->lru, moved);
- continue;
- }
+ goto next;
+
/*
* Skip locked pages during the first two passes to give the
* functions holding the lock time to release the page. Later we
@@ -747,10 +747,7 @@ redo:
* Page is properly locked and writeback is complete.
* Try to migrate the page.
*/
- if (!swap_page(page)) {
- list_move(&page->lru, moved);
- continue;
- }
+ rc = swap_page(page);
goto next;
unlock_page:
@@ -761,9 +758,12 @@ next:
retry++;
else if (rc) {
- /* Permanent failure to migrate the page */
+ /* Permanent failure */
list_move(&page->lru, failed);
nr_failed++;
+ } else {
+ /* Success */
+ list_move(&page->lru, moved);
}
}
if (retry && pass++ < 10)
next prev parent reply other threads:[~2005-11-28 20:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-28 20:42 [PATCH 0/7] Direct Migration V5: Overview Christoph Lameter
2005-11-28 20:42 ` [PATCH 1/7] Swap Migration: Fix double unlock Christoph Lameter
2005-11-28 20:42 ` Christoph Lameter [this message]
2005-11-28 20:42 ` [PATCH 3/7] Direct Migration V5: PageSwapCache checks Christoph Lameter
2005-11-28 20:43 ` [PATCH 4/7] Direct Migration V5: migrate_pages() extension Christoph Lameter
2005-11-30 8:34 ` [Lhms-devel] " KAMEZAWA Hiroyuki
2005-11-30 16:41 ` Christoph Lameter
2005-11-30 17:28 ` Kamezawa Hiroyuki
2005-11-30 17:55 ` Christoph Lameter
2005-11-30 23:48 ` KAMEZAWA Hiroyuki
2005-11-28 20:43 ` [PATCH 5/7] Direct Migration V5: remove_from_swap() to remove swap ptes Christoph Lameter
2005-11-30 11:29 ` [Lhms-devel] " KAMEZAWA Hiroyuki
2005-11-30 16:31 ` Christoph Lameter
2005-11-28 20:43 ` [PATCH 6/7] Direct Migration V5: upgrade MPOL_MF_MOVE and sys_migrate_pages() Christoph Lameter
2005-11-28 20:43 ` [PATCH 7/7] Direct Migration V5: Avoid writeback / page_migrate() method Christoph Lameter
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=20051128204254.10037.17837.sendpatchset@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@osdl.org \
--cc=cpw@sgi.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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