From: Ankita Garg <ankita@in.ibm.com>
To: linux-mm@kvack.org
Cc: ankita@in.ibm.com, svaidy@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] Capture references to page cache pages
Date: Tue, 5 Jul 2011 13:52:38 +0530 [thread overview]
Message-ID: <1309854159-8277-5-git-send-email-ankita@in.ibm.com> (raw)
In-Reply-To: <1309854159-8277-1-git-send-email-ankita@in.ibm.com>
Hi,
Page cache accesses may not be mapped, hence fake an access when a
pagecache page is looked up, by marking the corresponding memory
address block as accessed.
Signed-off-by: Ankita Garg <ankita@in.ibm.com>
---
mm/filemap.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index a8251a8..7ae7f36 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -36,6 +36,7 @@
#include <linux/mm_inline.h> /* for page_is_file_cache() */
#include <linux/cleancache.h>
#include "internal.h"
+#include <linux/memtrace.h>
/*
* FIXME: remove all knowledge of the buffer layer from the core VM
@@ -730,6 +731,13 @@ repeat:
page_cache_release(page);
goto repeat;
}
+#if defined(CONFIG_MEMTRACE)
+ if(get_pg_trace_pid() != -1 && current->mem_trace) {
+ unsigned long pfn = page_to_pfn(page);
+ if(pfn_valid(pfn))
+ mark_memtrace_block_accessed(pfn << PAGE_SHIFT);
+ }
+#endif
}
out:
rcu_read_unlock();
--
1.7.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 internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-07-05 8:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-05 8:22 [PATCH 0/5] mm,debug: VM framework to capture memory reference pattern Ankita Garg
2011-07-05 8:22 ` [PATCH 1/5] Core kernel backend to capture the " Ankita Garg
2011-07-05 8:22 ` [PATCH 2/5] memref module to walk the process page table Ankita Garg
2011-07-05 8:22 ` [PATCH 3/5] Capture kernel memory references Ankita Garg
2011-07-05 8:22 ` Ankita Garg [this message]
2011-07-05 8:22 ` [PATCH 5/5] Logging the captured reference data Ankita Garg
2011-07-05 23:33 ` [PATCH 0/5] mm,debug: VM framework to capture memory reference pattern Valdis.Kletnieks
2011-07-06 4:27 ` Ankita Garg
2011-07-06 9:01 ` Andrew Morton
2011-07-06 9:31 ` Ankita Garg
2011-07-06 13:36 ` Matt Mackall
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=1309854159-8277-5-git-send-email-ankita@in.ibm.com \
--to=ankita@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=svaidy@linux.vnet.ibm.com \
/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).