All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-07 15:01 ` Minchan Kim
  0 siblings, 0 replies; 18+ messages in thread
From: Minchan Kim @ 2010-12-07 15:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, LKML, Minchan Kim, Balbir Singh, KAMEZAWA Hiroyuki, Mel Gorman

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.

Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
 mm/compaction.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 50b0a90..b0fbfdf 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -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++;
 
-- 
1.7.0.4


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

* [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-07 15:01 ` Minchan Kim
  0 siblings, 0 replies; 18+ messages in thread
From: Minchan Kim @ 2010-12-07 15:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, LKML, Minchan Kim, Balbir Singh, KAMEZAWA Hiroyuki, Mel Gorman

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.

Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
 mm/compaction.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 50b0a90..b0fbfdf 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -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++;
 
-- 
1.7.0.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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
  2010-12-07 15:01 ` Minchan Kim
@ 2010-12-07 15:17   ` Balbir Singh
  -1 siblings, 0 replies; 18+ messages in thread
From: Balbir Singh @ 2010-12-07 15:17 UTC (permalink / raw)
  To: Minchan Kim; +Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Mel Gorman

* MinChan Kim <minchan.kim@gmail.com> [2010-12-08 00:01:26]:

> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> ---


Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
 

-- 
	Three Cheers,
	Balbir

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-07 15:17   ` Balbir Singh
  0 siblings, 0 replies; 18+ messages in thread
From: Balbir Singh @ 2010-12-07 15:17 UTC (permalink / raw)
  To: Minchan Kim; +Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Mel Gorman

* MinChan Kim <minchan.kim@gmail.com> [2010-12-08 00:01:26]:

> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> ---


Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
 

-- 
	Three Cheers,
	Balbir

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
  2010-12-07 15:01 ` Minchan Kim
@ 2010-12-07 21:53   ` Andrew Morton
  -1 siblings, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2010-12-07 21:53 UTC (permalink / raw)
  To: Minchan Kim; +Cc: linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki, Mel Gorman

On Wed,  8 Dec 2010 00:01:26 +0900
Minchan Kim <minchan.kim@gmail.com> wrote:

> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> ---
>  mm/compaction.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 50b0a90..b0fbfdf 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -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.


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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-07 21:53   ` Andrew Morton
  0 siblings, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2010-12-07 21:53 UTC (permalink / raw)
  To: Minchan Kim; +Cc: linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki, Mel Gorman

On Wed,  8 Dec 2010 00:01:26 +0900
Minchan Kim <minchan.kim@gmail.com> wrote:

> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> ---
>  mm/compaction.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 50b0a90..b0fbfdf 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -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.

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
  2010-12-07 21:53   ` Andrew Morton
@ 2010-12-07 22:19     ` Minchan Kim
  -1 siblings, 0 replies; 18+ messages in thread
From: Minchan Kim @ 2010-12-07 22:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki, Mel Gorman

On Wed, Dec 8, 2010 at 6:53 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed,  8 Dec 2010 00:01:26 +0900
> Minchan Kim <minchan.kim@gmail.com> wrote:
>
>> 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.
>>
>> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
>> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>> Cc: Mel Gorman <mel@csn.ul.ie>
>> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
>> ---
>>  mm/compaction.c |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/mm/compaction.c b/mm/compaction.c
>> index 50b0a90..b0fbfdf 100644
>> --- a/mm/compaction.c
>> +++ b/mm/compaction.c
>> @@ -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.

Thanks, Andrew.

>
>



-- 
Kind regards,
Minchan Kim

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-07 22:19     ` Minchan Kim
  0 siblings, 0 replies; 18+ messages in thread
From: Minchan Kim @ 2010-12-07 22:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki, Mel Gorman

On Wed, Dec 8, 2010 at 6:53 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed,  8 Dec 2010 00:01:26 +0900
> Minchan Kim <minchan.kim@gmail.com> wrote:
>
>> 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.
>>
>> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
>> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>> Cc: Mel Gorman <mel@csn.ul.ie>
>> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
>> ---
>>  mm/compaction.c |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/mm/compaction.c b/mm/compaction.c
>> index 50b0a90..b0fbfdf 100644
>> --- a/mm/compaction.c
>> +++ b/mm/compaction.c
>> @@ -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.

Thanks, Andrew.

>
>



-- 
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
  2010-12-07 15:01 ` Minchan Kim
@ 2010-12-08  0:59   ` KAMEZAWA Hiroyuki
  -1 siblings, 0 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2010-12-08  0:59 UTC (permalink / raw)
  To: Minchan Kim; +Cc: Andrew Morton, linux-mm, LKML, Balbir Singh, Mel Gorman

On Wed,  8 Dec 2010 00:01:26 +0900
Minchan Kim <minchan.kim@gmail.com> wrote:

> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

Thank you.



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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-08  0:59   ` KAMEZAWA Hiroyuki
  0 siblings, 0 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2010-12-08  0:59 UTC (permalink / raw)
  To: Minchan Kim; +Cc: Andrew Morton, linux-mm, LKML, Balbir Singh, Mel Gorman

On Wed,  8 Dec 2010 00:01:26 +0900
Minchan Kim <minchan.kim@gmail.com> wrote:

> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

Thank you.


--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
  2010-12-07 15:01 ` Minchan Kim
@ 2010-12-08 10:29   ` Mel Gorman
  -1 siblings, 0 replies; 18+ messages in thread
From: Mel Gorman @ 2010-12-08 10:29 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Andrew Morton, linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki

On Wed, Dec 08, 2010 at 12:01:26AM +0900, Minchan Kim wrote:
> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>

Thanks

Acked-by: Mel Gorman <mel@csn.ul.ie>

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-08 10:29   ` Mel Gorman
  0 siblings, 0 replies; 18+ messages in thread
From: Mel Gorman @ 2010-12-08 10:29 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Andrew Morton, linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki

On Wed, Dec 08, 2010 at 12:01:26AM +0900, Minchan Kim wrote:
> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>

Thanks

Acked-by: Mel Gorman <mel@csn.ul.ie>

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
  2010-12-07 15:01 ` Minchan Kim
@ 2010-12-08 16:43   ` Johannes Weiner
  -1 siblings, 0 replies; 18+ messages in thread
From: Johannes Weiner @ 2010-12-08 16:43 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Andrew Morton, linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki,
	Mel Gorman

On Wed, Dec 08, 2010 at 12:01:26AM +0900, Minchan Kim wrote:
> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>

Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>

But regarding the severity of this: shouldn't the second deletion
attempt be caught by the TestClearPageCgroupAcctLRU() early in
mem_cgroup_del_lru_list()?

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-08 16:43   ` Johannes Weiner
  0 siblings, 0 replies; 18+ messages in thread
From: Johannes Weiner @ 2010-12-08 16:43 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Andrew Morton, linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki,
	Mel Gorman

On Wed, Dec 08, 2010 at 12:01:26AM +0900, Minchan Kim wrote:
> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>

Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>

But regarding the severity of this: shouldn't the second deletion
attempt be caught by the TestClearPageCgroupAcctLRU() early in
mem_cgroup_del_lru_list()?

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
  2010-12-08 16:43   ` Johannes Weiner
@ 2010-12-08 22:25     ` Minchan Kim
  -1 siblings, 0 replies; 18+ messages in thread
From: Minchan Kim @ 2010-12-08 22:25 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki,
	Mel Gorman

On Thu, Dec 9, 2010 at 1:43 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> On Wed, Dec 08, 2010 at 12:01:26AM +0900, Minchan Kim wrote:
>> 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.
>>
>> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
>> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>> Cc: Mel Gorman <mel@csn.ul.ie>
>> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
>
> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
>
> But regarding the severity of this: shouldn't the second deletion
> attempt be caught by the TestClearPageCgroupAcctLRU() early in
> mem_cgroup_del_lru_list()?
>

Right, I missed that.
Andrew, I will resend modified description.

Thanks for careful review again, Hannes.

-- 
Kind regards,
Minchan Kim

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-08 22:25     ` Minchan Kim
  0 siblings, 0 replies; 18+ messages in thread
From: Minchan Kim @ 2010-12-08 22:25 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki,
	Mel Gorman

On Thu, Dec 9, 2010 at 1:43 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> On Wed, Dec 08, 2010 at 12:01:26AM +0900, Minchan Kim wrote:
>> 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.
>>
>> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
>> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>> Cc: Mel Gorman <mel@csn.ul.ie>
>> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
>
> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
>
> But regarding the severity of this: shouldn't the second deletion
> attempt be caught by the TestClearPageCgroupAcctLRU() early in
> mem_cgroup_del_lru_list()?
>

Right, I missed that.
Andrew, I will resend modified description.

Thanks for careful review again, Hannes.

-- 
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
  2010-12-07 15:01 ` Minchan Kim
@ 2010-12-09 14:59   ` Minchan Kim
  -1 siblings, 0 replies; 18+ messages in thread
From: Minchan Kim @ 2010-12-09 14:59 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki, Mel Gorman,
	Johannes Weiner

On Wed, Dec 08, 2010 at 12:01:26AM +0900, Minchan Kim wrote:
> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> ---
>  mm/compaction.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 50b0a90..b0fbfdf 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -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++;
>  
> -- 
> 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.

>From 64b3a2c1205d3ffc55878ab8f00f4d450318bb91 Mon Sep 17 00:00:00 2001
From: Minchan Kim <minchan.kim@gmail.com>
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.

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
 mm/compaction.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 50b0a90..b0fbfdf 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -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++;
 
-- 
1.7.0.4


-- 
Kind regards,
Minchan Kim

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

* Re: [PATCH] compaction: Remove mem_cgroup_del_lru
@ 2010-12-09 14:59   ` Minchan Kim
  0 siblings, 0 replies; 18+ messages in thread
From: Minchan Kim @ 2010-12-09 14:59 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, LKML, Balbir Singh, KAMEZAWA Hiroyuki, Mel Gorman,
	Johannes Weiner

On Wed, Dec 08, 2010 at 12:01:26AM +0900, Minchan Kim wrote:
> 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.
> 
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> ---
>  mm/compaction.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 50b0a90..b0fbfdf 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -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++;
>  
> -- 
> 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.

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

end of thread, other threads:[~2010-12-09 15:00 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 15:01 [PATCH] compaction: Remove mem_cgroup_del_lru Minchan Kim
2010-12-07 15:01 ` Minchan Kim
2010-12-07 15:17 ` Balbir Singh
2010-12-07 15:17   ` Balbir Singh
2010-12-07 21:53 ` Andrew Morton
2010-12-07 21:53   ` Andrew Morton
2010-12-07 22:19   ` Minchan Kim
2010-12-07 22:19     ` Minchan Kim
2010-12-08  0:59 ` KAMEZAWA Hiroyuki
2010-12-08  0:59   ` KAMEZAWA Hiroyuki
2010-12-08 10:29 ` Mel Gorman
2010-12-08 10:29   ` Mel Gorman
2010-12-08 16:43 ` Johannes Weiner
2010-12-08 16:43   ` Johannes Weiner
2010-12-08 22:25   ` Minchan Kim
2010-12-08 22:25     ` Minchan Kim
2010-12-09 14:59 ` Minchan Kim
2010-12-09 14:59   ` Minchan Kim

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.