From: Dave Hansen <dave@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, Dave Hansen <dave@linux.vnet.ibm.com>
Subject: [RFC][PATCH 3/3] use pte pages in OOM score
Date: Fri, 15 Apr 2011 10:38:24 -0700 [thread overview]
Message-ID: <20110415173824.79D354F4@kernel> (raw)
In-Reply-To: <20110415173821.62660715@kernel>
PTE pages eat up memory just like anything else, but we do
not account for them in any way in the OOM scores. They
are also _guaranteed_ to get freed up when a process is OOM
killed, while RSS is not.
Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
---
linux-2.6.git-dave/mm/oom_kill.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff -puN mm/oom_kill.c~use-pte-pages-in-oom-scire mm/oom_kill.c
--- linux-2.6.git/mm/oom_kill.c~use-pte-pages-in-oom-scire 2011-04-15 10:37:13.184831585 -0700
+++ linux-2.6.git-dave/mm/oom_kill.c 2011-04-15 10:37:13.192831581 -0700
@@ -192,8 +192,10 @@ unsigned int oom_badness(struct task_str
* The baseline for the badness score is the proportion of RAM that each
* task's rss and swap space use.
*/
- points = (get_mm_rss(p->mm) + get_mm_counter(p->mm, MM_SWAPENTS)) * 1000 /
- totalpages;
+ points = (get_mm_rss(p->mm) +
+ get_mm_counter(p->mm, MM_SWAPENTS) +
+ get_mm_counter(p->mm, MM_PTEPAGES))
+ * 1000 / totalpages;
task_unlock(p);
/*
_
--
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 internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-04-15 17:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 17:38 [RFC][PATCH 0/3] track pte pages and use in OOM score Dave Hansen
2011-04-15 17:38 ` [RFC][PATCH 1/3] pass mm in to pgtable ctor/dtor Dave Hansen
2011-04-15 17:38 ` [RFC][PATCH 2/3] track numbers of pagetable pages Dave Hansen
2011-04-16 9:44 ` Matt Fleming
2011-04-18 15:02 ` Dave Hansen
2011-04-26 14:57 ` Matt Fleming
2011-04-26 19:26 ` Hugh Dickins
2011-04-15 17:38 ` Dave Hansen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110415173824.79D354F4@kernel \
--to=dave@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).