]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Split the vm_page flags PG_WRITEABLE and PG_REFERENCED into atomic
authorkib <kib@FreeBSD.org>
Tue, 6 Sep 2011 10:30:11 +0000 (10:30 +0000)
committerkib <kib@FreeBSD.org>
Tue, 6 Sep 2011 10:30:11 +0000 (10:30 +0000)
commita9d505a22a9d9d343bf6874e995b921ad977453c
tree608b3b06589b15335451f37a8c8b11d1779e9a72
parenta6bb123606f7afa6fb3342b35dad217c76951ee3
Split the vm_page flags PG_WRITEABLE and PG_REFERENCED into atomic
flags field. Updates to the atomic flags are performed using the atomic
ops on the containing word, do not require any vm lock to be held, and
are non-blocking. The vm_page_aflag_set(9) and vm_page_aflag_clear(9)
functions are provided to modify afalgs.

Document the changes to flags field to only require the page lock.

Introduce vm_page_reference(9) function to provide a stable KPI and
KBI for filesystems like tmpfs and zfs which need to mark a page as
referenced.

Reviewed by:    alc, attilio
Tested by:      marius, flo (sparc64); andreast (powerpc, powerpc64)
Approved by: re (bz)
21 files changed:
sys/amd64/amd64/pmap.c
sys/arm/arm/pmap.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
sys/fs/tmpfs/tmpfs_vnops.c
sys/i386/i386/pmap.c
sys/i386/xen/pmap.c
sys/ia64/ia64/pmap.c
sys/mips/mips/pmap.c
sys/powerpc/aim/mmu_oea.c
sys/powerpc/aim/mmu_oea64.c
sys/powerpc/booke/pmap.c
sys/powerpc/powerpc/mmu_if.m
sys/sparc64/sparc64/pmap.c
sys/vm/swap_pager.c
sys/vm/vm_fault.c
sys/vm/vm_mmap.c
sys/vm/vm_object.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_pageout.c
sys/vm/vnode_pager.c