• Linus Torvalds's avatar
    Split ptep_establish into "establish" and "update_access_flags" · 6314b8e2
    Linus Torvalds authored
    ptep_establish() is used to establish a new mapping at COW time,
    and it always replaces a non-writable page mapping with a totally
    new page mapping that is dirty (and likely writable, although ptrace
    may cause a non-writable new mapping). Because it was nonwritable,
    we don't have to worry about losing concurrent dirty page bit updates.
    
    ptep_update_access_flags() leaves the same page mapping, but updates
    the accessed/dirty/writable bits (it only ever sets them, and never
    removes any permissions). Often easier, but it may race with a dirty
    bit update on another CPU.
    
    Booted on x86 and ppc64.
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    6314b8e2
pgtable.h 2.94 KB