linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org, marcelo.tosatti@cyclades.com,
	lee.schermerhorn@hp.com
Subject: Re: page migration reorg patch
Date: Thu, 16 Mar 2006 01:31:41 -0800	[thread overview]
Message-ID: <20060316013141.16c28224.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0603151828001.30650@schroedinger.engr.sgi.com>

Christoph Lameter <clameter@sgi.com> wrote:
>
> This patch centralizes the page migration functions in anticipation of
>  additional tinkering. Creates a new file mm/migrate.c


mm/migrate.c: In function `migrate_page_remove_references':
mm/migrate.c:200: warning: implicit declaration of function `__put_page'
mm/migrate.c: In function `isolate_lru_page':
mm/migrate.c:482: warning: implicit declaration of function `TestClearPageLRU'


Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 mm/migrate.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN mm/migrate.c~page-migration-reorg-fixes mm/migrate.c
--- devel/mm/migrate.c~page-migration-reorg-fixes	2006-03-16 01:28:18.000000000 -0800
+++ devel-akpm/mm/migrate.c	2006-03-16 01:28:18.000000000 -0800
@@ -26,6 +26,8 @@
 #include <linux/cpuset.h>
 #include <linux/swapops.h>
 
+#include "internal.h"
+
 /* The maximum number of pages to take off the LRU for migration */
 #define MIGRATE_CHUNK_SIZE 256
 
@@ -479,9 +481,10 @@ int isolate_lru_page(struct page *page)
 	if (PageLRU(page)) {
 		struct zone *zone = page_zone(page);
 		spin_lock_irq(&zone->lru_lock);
-		if (TestClearPageLRU(page)) {
+		if (PageLRU(page)) {
 			ret = 1;
 			get_page(page);
+			ClearPageLRU(page);
 			if (PageActive(page))
 				del_page_from_active_list(zone, page);
 			else
_


This wasn't compile tested and it wasn't runtime tested.  But the worrisome
part is that the patch failed to bring over changes which were made by
earlier patches.  So it possibly reverts important changes.

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2006-03-16  9:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16  1:42 Christoph Lameter
2006-03-16  1:48 ` Christoph Lameter
2006-03-16  1:59   ` Christoph Lameter
2006-03-16  1:55 ` Andrew Morton
2006-03-16  2:32   ` Christoph Lameter
2006-03-16  3:34     ` Andrew Morton
2006-03-16  9:31     ` Andrew Morton [this message]

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=20060316013141.16c28224.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-mm@kvack.org \
    --cc=marcelo.tosatti@cyclades.com \
    /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