All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: fix accounting on page_remove_rmap()
@ 2013-09-02 11:43 ` Kirill A. Shutemov
  0 siblings, 0 replies; 4+ messages in thread
From: Kirill A. Shutemov @ 2013-09-02 11:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ning Qu, linux-mm, linux-kernel, Kirill A. Shutemov

There's typo in page_remove_rmap(): we increase NR_ANON_PAGES counter
instead of decreasing it. Let's fix this.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Ning Qu <quning@google.com>
---
 mm/rmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/rmap.c b/mm/rmap.c
index 52cc59a..6219f07 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1156,7 +1156,7 @@ void page_remove_rmap(struct page *page)
 			__dec_zone_page_state(page,
 					      NR_ANON_TRANSPARENT_HUGEPAGES);
 		__mod_zone_page_state(page_zone(page), NR_ANON_PAGES,
-				hpage_nr_pages(page));
+				-hpage_nr_pages(page));
 	} else {
 		__dec_zone_page_state(page, NR_FILE_MAPPED);
 		mem_cgroup_dec_page_stat(page, MEM_CGROUP_STAT_FILE_MAPPED);
-- 
1.8.4.rc3


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

* [PATCH] mm: fix accounting on page_remove_rmap()
@ 2013-09-02 11:43 ` Kirill A. Shutemov
  0 siblings, 0 replies; 4+ messages in thread
From: Kirill A. Shutemov @ 2013-09-02 11:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ning Qu, linux-mm, linux-kernel, Kirill A. Shutemov

There's typo in page_remove_rmap(): we increase NR_ANON_PAGES counter
instead of decreasing it. Let's fix this.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Ning Qu <quning@google.com>
---
 mm/rmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/rmap.c b/mm/rmap.c
index 52cc59a..6219f07 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1156,7 +1156,7 @@ void page_remove_rmap(struct page *page)
 			__dec_zone_page_state(page,
 					      NR_ANON_TRANSPARENT_HUGEPAGES);
 		__mod_zone_page_state(page_zone(page), NR_ANON_PAGES,
-				hpage_nr_pages(page));
+				-hpage_nr_pages(page));
 	} else {
 		__dec_zone_page_state(page, NR_FILE_MAPPED);
 		mem_cgroup_dec_page_stat(page, MEM_CGROUP_STAT_FILE_MAPPED);
-- 
1.8.4.rc3

--
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] 4+ messages in thread

* Re: [PATCH] mm: fix accounting on page_remove_rmap()
  2013-09-02 11:43 ` Kirill A. Shutemov
  (?)
  (?)
@ 2013-09-03  0:15 ` Wanpeng Li
  -1 siblings, 0 replies; 4+ messages in thread
From: Wanpeng Li @ 2013-09-03  0:15 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: Andrew Morton, Ning Qu, linux-mm, linux-kernel

On Mon, Sep 02, 2013 at 02:43:11PM +0300, Kirill A. Shutemov wrote:
>There's typo in page_remove_rmap(): we increase NR_ANON_PAGES counter
>instead of decreasing it. Let's fix this.
>
>Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>Reported-by: Ning Qu <quning@google.com>

Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>

>---
> mm/rmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/mm/rmap.c b/mm/rmap.c
>index 52cc59a..6219f07 100644
>--- a/mm/rmap.c
>+++ b/mm/rmap.c
>@@ -1156,7 +1156,7 @@ void page_remove_rmap(struct page *page)
> 			__dec_zone_page_state(page,
> 					      NR_ANON_TRANSPARENT_HUGEPAGES);
> 		__mod_zone_page_state(page_zone(page), NR_ANON_PAGES,
>-				hpage_nr_pages(page));
>+				-hpage_nr_pages(page));
> 	} else {
> 		__dec_zone_page_state(page, NR_FILE_MAPPED);
> 		mem_cgroup_dec_page_stat(page, MEM_CGROUP_STAT_FILE_MAPPED);
>-- 
>1.8.4.rc3
>
>--
>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>

--
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] 4+ messages in thread

* Re: [PATCH] mm: fix accounting on page_remove_rmap()
  2013-09-02 11:43 ` Kirill A. Shutemov
  (?)
@ 2013-09-03  0:15 ` Wanpeng Li
  -1 siblings, 0 replies; 4+ messages in thread
From: Wanpeng Li @ 2013-09-03  0:15 UTC (permalink / raw)
  Cc: Andrew Morton, Ning Qu, linux-mm, linux-kernel, Kirill A. Shutemov

On Mon, Sep 02, 2013 at 02:43:11PM +0300, Kirill A. Shutemov wrote:
>There's typo in page_remove_rmap(): we increase NR_ANON_PAGES counter
>instead of decreasing it. Let's fix this.
>
>Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>Reported-by: Ning Qu <quning@google.com>

Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>

>---
> mm/rmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/mm/rmap.c b/mm/rmap.c
>index 52cc59a..6219f07 100644
>--- a/mm/rmap.c
>+++ b/mm/rmap.c
>@@ -1156,7 +1156,7 @@ void page_remove_rmap(struct page *page)
> 			__dec_zone_page_state(page,
> 					      NR_ANON_TRANSPARENT_HUGEPAGES);
> 		__mod_zone_page_state(page_zone(page), NR_ANON_PAGES,
>-				hpage_nr_pages(page));
>+				-hpage_nr_pages(page));
> 	} else {
> 		__dec_zone_page_state(page, NR_FILE_MAPPED);
> 		mem_cgroup_dec_page_stat(page, MEM_CGROUP_STAT_FILE_MAPPED);
>-- 
>1.8.4.rc3
>
>--
>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>

--
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] 4+ messages in thread

end of thread, other threads:[~2013-09-03  0:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-02 11:43 [PATCH] mm: fix accounting on page_remove_rmap() Kirill A. Shutemov
2013-09-02 11:43 ` Kirill A. Shutemov
2013-09-03  0:15 ` Wanpeng Li
2013-09-03  0:15 ` Wanpeng Li

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.