compaction: Remove mem_cgroup_del_lru
Subsystems (2)
PATCH 1/1 compaction: Remove mem_cgroup_del_lru
del_page_from_lru_list alreay called mem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happen VM_BUG_ON hit.
--- mm/compaction.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
mm/compaction.c +0 -1
@@ -302,7 +302,6 @@ static unsigned long isolate_migratepages(struct zone *zone,/* Successfully isolated */ del_page_from_lru_list (zone, page,page_lru (page));list_add (&page->lru, migratelist); -mem_cgroup_del_lru (page); cc->nr_migratepages++; nr_isolated++;
Signature · 1 line
1.7.0.4
Andrew Morton
maintainerQuoted 17 lines · On Wed, 8 Dec 2010 00:01:26 +0900 Minchan Kim <[email protected]> wrote:
del_page_from_lru_listalreay calledmem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happenVM_BUG_ONhit.Cc Balbir Singh <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Signed-off-by Minchan Kim <[email protected]>--- mm/compaction.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)mm/compaction.c +0
-0
mm/compaction.c static unsigned long isolate_migratepages(struct zone *zone, · line 307
Quoted 7 lines
mm/compaction.c +0
-1@@ -302,7 +302,6 @@ static unsigned long isolate_migratepages(struct zone *zone,/* Successfully isolated */ del_page_from_lru_list (zone, page,page_lru (page));list_add (&page->lru, migratelist); -mem_cgroup_del_lru (page); cc->nr_migratepages++; nr_isolated++;
err, yes, that looks bad.
This bug is present in 2.6.35 and 2.6.36 afaict, so I tagged the fix for -stable backporting.
Quoted 30 lines · Andrew Morton
Quoted 17 lines · On Wed, 8 Dec 2010 00:01:26 +0900 Minchan Kim <[email protected]> wrote:
del_page_from_lru_listalreay calledmem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happenVM_BUG_ONhit.Cc Balbir Singh <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Signed-off-by Minchan Kim <[email protected]>---
mm/compaction.c | 1 -1 files changed, 0 insertions(+), 1 deletions(-)mm/compaction.c +0
-0mm/compaction.c static unsigned long isolate_migratepages(struct zone *zone, · line 307
Quoted 7 lines
mm/compaction.c +0
-1@@ -302,7 +302,6 @@ static unsigned long isolate_migratepages(struct zone *zone, /* Successfully isolated */ del_page_from_lru_list(zone, page, page_lru(page)); list_add(&page->lru, migratelist); - mem_cgroup_del_lru(page); cc->nr_migratepages++; nr_isolated++;err, yes, that looks bad.
Quoted 2 lines
This bug is present in 2.6.35 and 2.6.36 afaict, so I tagged the fix for -stable backporting.
Thanks, Andrew.
Quoted 2 lines
Signature · 9 lines
Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · On Wed, 8 Dec 2010 00:01:26 +0900 Minchan Kim <[email protected]> wrote:
del_page_from_lru_listalreay calledmem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happenVM_BUG_ONhit.Cc Balbir Singh <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Signed-off-by Minchan Kim <[email protected]>
Thank you.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · MinChan Kim
del_page_from_lru_listalreay calledmem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happenVM_BUG_ONhit.Cc Balbir Singh <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Signed-off-by Minchan Kim <[email protected]>---
Signature · 9 lines
Three Cheers, Balbir -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Minchan Kim
del_page_from_lru_listalreay calledmem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happenVM_BUG_ONhit.Cc Balbir Singh <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Signed-off-by Minchan Kim <[email protected]>
Thanks
Signature · 3 lines
Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab
Quoted 8 lines · Minchan Kim
del_page_from_lru_listalreay calledmem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happenVM_BUG_ONhit.Cc Balbir Singh <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Signed-off-by Minchan Kim <[email protected]>
But regarding the severity of this: shouldn't the second deletion attempt be caught by the TestClearPageCgroupAcctLRU() early in mem_cgroup_del_lru_list()?
Quoted 10 lines · Johannes Weiner
Quoted 8 lines · Minchan Kim
del_page_from_lru_listalreay calledmem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happenVM_BUG_ONhit.Cc Balbir Singh <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Signed-off-by Minchan Kim <[email protected]>
Quoted 6 lines
Reviewed-by Johannes Weiner <[email protected]>But regarding the severity of this: shouldn't the second deletion attempt be caught by the
TestClearPageCgroupAcctLRU()early inmem_cgroup_del_lru_list()?
Right, I missed that.
Andrew, I will resend modified description.
Thanks for careful review again, Hannes.
Signature · 2 lines
Kind regards, Minchan Kim
Minchan Kim
Acked-by KAMEZAWA Hiroyuki Acked-by Balbir Singh Acked-by Mel Gorman Reviewed-by Johannes Weiner on v1 1/1Quoted 27 lines · Minchan Kim
del_page_from_lru_listalreay calledmem_cgroup_del_lru. So we need to call it again. It makes wrong stat of memcg and even happenVM_BUG_ONhit.Cc Balbir Singh <[email protected]>Cc KAMEZAWA Hiroyuki <[email protected]>Cc Mel Gorman <[email protected]>Signed-off-by Minchan Kim <[email protected]>--- mm/compaction.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)mm/compaction.c +0
-1@@ -302,7 +302,6 @@ static unsigned long isolate_migratepages(struct zone *zone,/* Successfully isolated */ del_page_from_lru_list (zone, page,page_lru (page));list_add (&page->lru, migratelist); -mem_cgroup_del_lru (page); cc->nr_migratepages++; nr_isolated++;Signature · 1 line
1.7.0.4
Hi Andrew,
Please drop above(mm-compactionc-avoid-double-mem_cgroup_del_lru.patch) This is a new version with modified description and added Acked-by.
Quoted 1 line
From
64b3a2c1205d3ffc55878ab8f00f4d450318bb91Mon Sep 17 00:00:00 2001
From: Minchan Kim <[email protected]>
Date: Thu, 9 Dec 2010 23:49:27 +0900
Subject: [PATCH] mm/compaction.c: avoid double mem_cgroup_del_lru()
del_page_from_lru_list() already called mem_cgroup_del_lru(). So we must not call it again. It adds unnecessary overhead.
--- mm/compaction.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
mm/compaction.c +0 -1
@@ -302,7 +302,6 @@ static unsigned long isolate_migratepages(struct zone *zone,/* Successfully isolated */ del_page_from_lru_list (zone, page,page_lru (page));list_add (&page->lru, migratelist); -mem_cgroup_del_lru (page); cc->nr_migratepages++; nr_isolated++;
Signature · 6 lines
1.7.0.4 -- Kind regards, Minchan Kim