linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andy Whitcroft <apw@shadowen.org>, Mel Gorman <mel@csn.ul.ie>
Subject: [PATCH 2/3] lumpy: back out removal of active check in isolate_lru_pages
Date: Mon, 12 Mar 2007 18:23:47 +0000	[thread overview]
Message-ID: <6619d81fbc4236897250d4b1ee9b4081@pinky> (raw)
In-Reply-To: <exportbomb.1173723760@pinky>

As pointed out by Christop Lameter it should not be possible for a
page to change its active/inactive state without taking the lru_lock.
Reinstate this safety net.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
---
diff --git a/mm/vmscan.c b/mm/vmscan.c
index bda63a0..d7a0860 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -691,10 +691,13 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
 			nr_taken++;
 			break;
 
-		default:
-			/* page is being freed, or is a missmatch */
+		case -EBUSY:
+			/* else it is being freed elsewhere */
 			list_move(&page->lru, src);
 			continue;
+
+		default:
+			BUG();
 		}
 
 		if (!order)

--
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:[~2007-03-12 18:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12 18:22 [PATCH 0/3] Lumpy Reclaim V5 Andy Whitcroft
2007-03-12 18:23 ` [PATCH 1/3] Lumpy Reclaim V4 Andy Whitcroft
2007-03-12 18:36   ` Dave Hansen
2007-03-12 18:48     ` Andy Whitcroft
2007-03-12 18:23 ` Andy Whitcroft [this message]
2007-03-12 18:24 ` [PATCH 3/3] lumpy: only count taken pages as scanned Andy Whitcroft
2007-03-16  3:20 ` [PATCH 0/3] Lumpy Reclaim V5 Andrew Morton
2007-03-17 13:27   ` Andy Whitcroft

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=6619d81fbc4236897250d4b1ee9b4081@pinky \
    --to=apw@shadowen.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    /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