Does perf_counter need to make mmap pages uptodate?

From: Paul Mackerras
Date: Fri Aug 14 2009 - 02:00:52 EST


At a colleague's request, I did a backport of the perf_counter code to
2.6.30.3. When I tried "perf record ls" I hit the WARN_ON_ONCE in
__set_page_dirty (fs/buffer.c line 669):

WARN_ON_ONCE(warn && !PageUptodate(page));

and indeed we never mark the pages that we let userspace mmap as being
uptodate. To get around the problem I added

SetPageUptodate(vmf->page);

after the get_page call in perf_mmap_fault, but I can't see any
relevant changes between 2.6.30 and current upstream that would cause
this to be necessary for 2.6.30 but not for current upstream.

Should we in fact be marking the pages uptodate, or is there some
reason why we should never get to that WARN_ON_ONCE?

Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/