All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/vmscan: remove checking on PG_lru
@ 2012-07-17  4:44 Gavin Shan
  2012-07-17  8:45 ` Minchan Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Gavin Shan @ 2012-07-17  4:44 UTC (permalink / raw)
  To: linux-mm; +Cc: rientjes, akpm, Gavin Shan

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>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/vmscan: remove checking on PG_lru
  2012-07-17  4:44 [PATCH] mm/vmscan: remove checking on PG_lru Gavin Shan
@ 2012-07-17  8:45 ` Minchan Kim
  2012-07-17  8:59   ` Gavin Shan
  0 siblings, 1 reply; 3+ messages in thread
From: Minchan Kim @ 2012-07-17  8:45 UTC (permalink / raw)
  To: Gavin Shan; +Cc: linux-mm, rientjes, akpm

Hello Gavin,

On Tue, Jul 17, 2012 at 12:44:14PM +0800, Gavin Shan wrote:
> Function __isolate_lru_page() is called by isolate_lru_pages() or
> isolate_migratepages_range(). For both cases, the PG_lru flag for

In isolate_lru_pages, the check is with VM_BUG_ON so if we disable
CONFIG_DEBUG_VM, we still need it.

-- 
Kind regards,
Minchan Kim

--
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/vmscan: remove checking on PG_lru
  2012-07-17  8:45 ` Minchan Kim
@ 2012-07-17  8:59   ` Gavin Shan
  0 siblings, 0 replies; 3+ messages in thread
From: Gavin Shan @ 2012-07-17  8:59 UTC (permalink / raw)
  To: Minchan Kim; +Cc: Gavin Shan, linux-mm, rientjes, akpm

>Hello Gavin,
>
>On Tue, Jul 17, 2012 at 12:44:14PM +0800, Gavin Shan wrote:
>> Function __isolate_lru_page() is called by isolate_lru_pages() or
>> isolate_migratepages_range(). For both cases, the PG_lru flag for
>
>In isolate_lru_pages, the check is with VM_BUG_ON so if we disable
>CONFIG_DEBUG_VM, we still need it.
>

Thanks, Minchan. Sorry for the noise then :-)

Gavin

>-- 
>Kind regards,
>Minchan Kim
>

--
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-17  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17  4:44 [PATCH] mm/vmscan: remove checking on PG_lru Gavin Shan
2012-07-17  8:45 ` Minchan Kim
2012-07-17  8:59   ` Gavin Shan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.