From: Gavin Shan <shangw@linux.vnet.ibm.com>
To: linux-mm@kvack.org
Cc: rientjes@google.com, akpm@linux-foundation.org,
Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: [PATCH] mm/vmscan: remove checking on PG_lru
Date: Tue, 17 Jul 2012 12:44:14 +0800 [thread overview]
Message-ID: <1342500254-28384-1-git-send-email-shangw@linux.vnet.ibm.com> (raw)
Function __isolate_lru_page() is called by isolate_lru_pages() or
isolate_migratepages_range(). For both cases, the PG_lru flag for
the target page frame has been checked. So we needn't check that
again in function __isolate_lru_page() and just remove the check
in function __isolate_lru_page().
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
mm/vmscan.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 6615763..77d5704 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -940,10 +940,6 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
{
int ret = -EINVAL;
- /* Only take pages on the LRU. */
- if (!PageLRU(page))
- return ret;
-
/* Do not give back unevictable pages for compaction */
if (PageUnevictable(page))
return ret;
--
1.7.5.4
--
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>
next reply other threads:[~2012-07-17 4:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-17 4:44 Gavin Shan [this message]
2012-07-17 8:45 ` [PATCH] mm/vmscan: remove checking on PG_lru Minchan Kim
2012-07-17 8:59 ` Gavin Shan
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=1342500254-28384-1-git-send-email-shangw@linux.vnet.ibm.com \
--to=shangw@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.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;
as well as URLs for NNTP newsgroup(s).