aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/interface.c
diff options
context:
space:
mode:
authorPeter Zijlstra <[email protected]>2008-07-04 16:59:24 +0000
committerLinus Torvalds <[email protected]>2008-07-04 17:40:04 +0000
commit251b97f552b1ad414cc5a9ccc8e4e94503edd5fc (patch)
tree5d7559154edb8eb2069f39b6be99ffc2484580cd /drivers/rtc/interface.c
parentChristoph has moved (diff)
downloadkernel-251b97f552b1ad414cc5a9ccc8e4e94503edd5fc.tar.gz
kernel-251b97f552b1ad414cc5a9ccc8e4e94503edd5fc.zip
mm: dirty page accounting vs VM_MIXEDMAP
Dirty page accounting accurately measures the amound of dirty pages in writable shared mappings by mapping the pages RO (as indicated by vma_wants_writenotify). We then trap on first write and call set_page_dirty() on the page, after which we map the page RW and continue execution. When we launder dirty pages, we call clear_page_dirty_for_io() which clears both the dirty flag, and maps the page RO again before we start writeout so that the story can repeat itself. vma_wants_writenotify() excludes VM_PFNMAP on the basis that we cannot do the regular dirty page stuff on raw PFNs and the memory isn't going anywhere anyway. The recently introduced VM_MIXEDMAP mixes both !pfn_valid() and pfn_valid() pages in a single mapping. We can't do dirty page accounting on !pfn_valid() pages as stated above, and mapping them RO causes them to be COW'ed on write, which breaks VM_SHARED semantics. Excluding VM_MIXEDMAP in vma_wants_writenotify() would mean we don't do the regular dirty page accounting for the pfn_valid() pages, which would bring back all the head-aches from inaccurate dirty page accounting. So instead, we let the !pfn_valid() pages get mapped RO, but fix them up unconditionally in the fault path. Signed-off-by: Peter Zijlstra <[email protected]> Cc: Nick Piggin <[email protected]> Acked-by: Hugh Dickins <[email protected]> Cc: "Jared Hulbert" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/rtc/interface.c')
0 files changed, 0 insertions, 0 deletions