]> git.hungrycats.org Git - linux/commit
Split ptep_establish into "establish" and "update_access_flags"
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 26 May 2004 00:56:23 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 26 May 2004 00:56:23 +0000 (17:56 -0700)
commit6314b8e29bf462a34dde8f05d3eb1ec1a893a65c
tree5c4e550f35ae9b4df95ffd221e8640938c2c0751
parent5e681ee3377fbb5d6ba5a0850189419eb4b8f0a4
Split ptep_establish into "establish" and "update_access_flags"

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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-generic/pgtable.h
include/asm-i386/pgtable.h
include/asm-ppc/pgtable.h
include/asm-ppc64/pgtable.h
include/asm-s390/pgtable.h
mm/memory.c