linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][mmotm-2010-02-01-16-25] Fix wrong accouting of anon and file
@ 2010-02-03 15:25 Minchan Kim
  2010-02-03 18:20 ` David Rientjes
  0 siblings, 1 reply; 2+ messages in thread
From: Minchan Kim @ 2010-02-03 15:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: KAMEZAWA Hiroyuki, Christoph Lameter, Lee Schermerhorn,
	David Rientjes, linux-mm, linux-kernel

Unfortunately, Kame said he doesn't support this series.
I am not sure we need this patch or revert patch.

Who need this?

David. Do you want to remain this patch in mmotm for your OOM patch 
in future?

If anyone doesn't reply my question, Do we have to make revert patch?

== CUT_HERE == 

mm-count-lowmem-rss.patch added lowmem accouting.
But it changed file and rss accouting by mistake.
Unfortunately my review also doesn't found it.

This patch fixes it.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
 mm/memory.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 3becdc3..ce8ff9d 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -210,14 +210,14 @@ void sync_mm_rss(struct task_struct *task, struct mm_struct *mm)
 
 unsigned long get_file_rss(struct mm_struct *mm)
 {
-	return get_mm_counter(mm, MM_ANONPAGES)
-		+ get_mm_counter(mm, MM_ANON_LOWPAGES);
+	return get_mm_counter(mm, MM_FILEPAGES)
+		+ get_mm_counter(mm, MM_FILE_LOWPAGES);
 }
 
 unsigned long get_anon_rss(struct mm_struct *mm)
 {
-	return get_mm_counter(mm, MM_FILEPAGES)
-		+ get_mm_counter(mm, MM_FILE_LOWPAGES);
+	return get_mm_counter(mm, MM_ANONPAGES)
+		+ get_mm_counter(mm, MM_ANON_LOWPAGES);
 }
 
 unsigned long get_low_rss(struct mm_struct *mm)
-- 
1.6.5



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

* Re: [PATCH][mmotm-2010-02-01-16-25] Fix wrong accouting of anon and file
  2010-02-03 15:25 [PATCH][mmotm-2010-02-01-16-25] Fix wrong accouting of anon and file Minchan Kim
@ 2010-02-03 18:20 ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2010-02-03 18:20 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Andrew Morton, KAMEZAWA Hiroyuki, Christoph Lameter,
	Lee Schermerhorn, linux-mm, linux-kernel

On Thu, 4 Feb 2010, Minchan Kim wrote:

> Unfortunately, Kame said he doesn't support this series.
> I am not sure we need this patch or revert patch.
> 

Nobody is currently using it and it adds an overhead just by doing the 
extra branches, so I'd be inclined to drop mm-count-lowmem-rss.patch from 
-mm and then reintroduce it later if something needs it down the line.

> Who need this?
> 
> David. Do you want to remain this patch in mmotm for your OOM patch 
> in future?
> 

We'll need to do something for lowmem ooms so that we aren't needlessly 
killing taks that don't consume it.  At this point, I think it's better to 
just fail GFP_DMA allocations where direct reclaim (and, later, memory 
compaction) has failed unless it is __GFP_NOFAIL, which none of them are.  
So this would be a change to the page allocator to defer the oom killer 
and return NULL on GFP_DMA instead of needlessly killing tasks.

> If anyone doesn't reply my question, Do we have to make revert patch?
> 

We won't need a revert patch, Andrew will be able to simply drop 
mm-count-lowmem-rss.patch from -mm.

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

end of thread, other threads:[~2010-02-03 18:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-03 15:25 [PATCH][mmotm-2010-02-01-16-25] Fix wrong accouting of anon and file Minchan Kim
2010-02-03 18:20 ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox