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 3/3] lumpy: only count taken pages as scanned
Date: Mon, 12 Mar 2007 18:24:18 +0000	[thread overview]
Message-ID: <f1e5ef335bb5a202c7b18faaa0e97b83@pinky> (raw)
In-Reply-To: <exportbomb.1173723760@pinky>

When scanning the order sized area around the tag page we pull all
pages of the matching active state; the non-matching pages are not
otherwise affected.  We currently count these as scanned increasing
the apparent scan rates.  Previously we would only count a page
scanned if it was actually removed from the LRU, either then being
reclaimed or rotated back onto the head of the LRU.

The effect of this is to cause reclaim to terminate artificially
early when the scan count is reached, reducing effectivness.  Move to
counting only those pages we actually remove from the LRU as scanned.

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 d7a0860..c3dc544 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -732,11 +732,11 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
 			/* Check that we have not crossed a zone boundary. */
 			if (unlikely(page_zone_id(cursor_page) != zone_id))
 				continue;
-			scan++;
 			switch (__isolate_lru_page(cursor_page, active)) {
 			case 0:
 				list_move(&cursor_page->lru, dst);
 				nr_taken++;
+				scan++;
 				break;
 
 			case -EBUSY:

--
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:24 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 ` [PATCH 2/3] lumpy: back out removal of active check in isolate_lru_pages Andy Whitcroft
2007-03-12 18:24 ` Andy Whitcroft [this message]
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=f1e5ef335bb5a202c7b18faaa0e97b83@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