diff options
author | alc <alc@FreeBSD.org> | 2011-06-19 19:13:24 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2011-06-19 19:13:24 +0000 |
commit | 95eeb54f1851c76cfe5b9e42279355b40ddcd603 (patch) | |
tree | c157b398093fb892894a2613dcee35c7338c30d8 /sys/vm/vm_fault.c | |
parent | 20c059f23d5a3b162be17082e5b8821bf732b51e (diff) | |
download | FreeBSD-src-95eeb54f1851c76cfe5b9e42279355b40ddcd603.zip FreeBSD-src-95eeb54f1851c76cfe5b9e42279355b40ddcd603.tar.gz |
Precisely document the synchronization rules for the page's dirty field.
(Saying that the lock on the object that the page belongs to must be held
only represents one aspect of the rules.)
Eliminate the use of the page queues lock for atomically performing read-
modify-write operations on the dirty field when the underlying architecture
supports atomic operations on char and short types.
Document the fact that 32KB pages aren't really supported.
Reviewed by: attilio, kib
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r-- | sys/vm/vm_fault.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index d417a84..7568f57 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1089,10 +1089,20 @@ vm_fault_quick_hold_pages(vm_map_t map, vm_offset_t addr, vm_size_t len, * caller's changes may go unnoticed because they are * performed through an unmanaged mapping or by a DMA * operation. + * + * The object lock is not held here. Therefore, like + * a pmap operation, the page queues lock may be + * required in order to call vm_page_dirty(). See + * vm_page_clear_dirty_mask(). */ +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) || \ + defined(__mips__) + vm_page_dirty(*mp); +#else vm_page_lock_queues(); vm_page_dirty(*mp); vm_page_unlock_queues(); +#endif } } if (pmap_failed) { |