]> Git Repo - linux.git/commit
mlock: avoid dirtying pages and triggering writeback
authorMichel Lespinasse <[email protected]>
Thu, 13 Jan 2011 23:46:09 +0000 (15:46 -0800)
committerLinus Torvalds <[email protected]>
Fri, 14 Jan 2011 01:32:35 +0000 (17:32 -0800)
commit5ecfda041e4b4bd858d25bbf5a16c2a6c06d7272
treee6c3e7dac64a5e45b48ab7836318752202579a17
parent72ddc8f72270758951ccefb7d190f364d20215ab
mlock: avoid dirtying pages and triggering writeback

When faulting in pages for mlock(), we want to break COW for anonymous or
file pages within VM_WRITABLE, non-VM_SHARED vmas.  However, there is no
need to write-fault into VM_SHARED vmas since shared file pages can be
mlocked first and dirtied later, when/if they actually get written to.
Skipping the write fault is desirable, as we don't want to unnecessarily
cause these pages to be dirtied and queued for writeback.

Signed-off-by: Michel Lespinasse <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Kosaki Motohiro <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Theodore Tso <[email protected]>
Cc: Michael Rubin <[email protected]>
Cc: Suleiman Souhlal <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memory.c
mm/mlock.c
This page took 0.051761 seconds and 4 git commands to generate.