[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-7396fa818d6278694a44840f389ddc40a3269a9a@git.kernel.org>
Date: Sat, 14 Apr 2012 11:25:12 -0700
From: tip-bot for Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, torvalds@...ux-foundation.org,
peterz@...radead.org, anton@...hat.com, rostedt@...dmis.org,
jkenisto@...ux.vnet.ibm.com, tglx@...utronix.de, oleg@...hat.com,
linux-mm@...ck.org, hpa@...or.com, linux-kernel@...r.kernel.org,
andi@...stfloor.org, hch@...radead.org, ananth@...ibm.com,
masami.hiramatsu.pt@...achi.com, acme@...radead.org,
srikar@...ux.vnet.ibm.com
Subject: [tip:perf/uprobes] uprobes/core:
Make background page replacement logic account for rss_stat counters
Commit-ID: 7396fa818d6278694a44840f389ddc40a3269a9a
Gitweb: http://git.kernel.org/tip/7396fa818d6278694a44840f389ddc40a3269a9a
Author: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
AuthorDate: Wed, 11 Apr 2012 16:05:16 +0530
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sat, 14 Apr 2012 13:25:47 +0200
uprobes/core: Make background page replacement logic account for rss_stat counters
Background page replacement logic adds a new anonymous page
instead of a file backed (while inserting a breakpoint) /
anonymous page (while removing a breakpoint).
Hence the uprobes logic should take care to update the
task->ss_stat counters accordingly.
This bug became apparent courtesy of commit c3f0327f8e9d
("mm: add rss counters consistency check").
Signed-off-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Ananth N Mavinakayanahalli <ananth@...ibm.com>
Cc: Jim Keniston <jkenisto@...ux.vnet.ibm.com>
Cc: Linux-mm <linux-mm@...ck.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: Christoph Hellwig <hch@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Arnaldo Carvalho de Melo <acme@...radead.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Anton Arapov <anton@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/20120411103516.23245.2700.sendpatchset@srdronam.in.ibm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/events/uprobes.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 29e881b..c5caeec 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -160,6 +160,11 @@ static int __replace_page(struct vm_area_struct *vma, struct page *page, struct
get_page(kpage);
page_add_new_anon_rmap(kpage, vma, addr);
+ if (!PageAnon(page)) {
+ dec_mm_counter(mm, MM_FILEPAGES);
+ inc_mm_counter(mm, MM_ANONPAGES);
+ }
+
flush_cache_page(vma, addr, pte_pfn(*ptep));
ptep_clear_flush(vma, addr, ptep);
set_pte_at_notify(mm, addr, ptep, mk_pte(kpage, vma->vm_page_prot));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists