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@xxxxxxxxxx> --- 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@xxxxxxxxx. 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@xxxxxxxxx"> email@xxxxxxxxx </a>