summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-09-28 14:57:50 +0000
committerkib <kib@FreeBSD.org>2011-09-28 14:57:50 +0000
commite84b0ecd819abddadeed97fa141468b674261293 (patch)
tree6a5296fc970ddac679f37c4f859ef750f1173a7e /sys/vm/vm_page.h
parent3a1a19715027c5c03af47ff8d3ce06461e3b4d65 (diff)
downloadFreeBSD-src-e84b0ecd819abddadeed97fa141468b674261293.zip
FreeBSD-src-e84b0ecd819abddadeed97fa141468b674261293.tar.gz
Use the trick of performing the atomic operation on the contained aligned
word to handle the dirty mask updates in vm_page_clear_dirty_mask(). Remove the vm page queue lock around vm_page_dirty() call in vm_fault_hold() the sole purpose of which was to protect dirty on architectures which does not provide short or byte-wide atomics. Reviewed by: alc, attilio Tested by: flo (sparc64) MFC after: 2 weeks
Diffstat (limited to 'sys/vm/vm_page.h')
-rw-r--r--sys/vm/vm_page.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index f7f3aed..1218dc8 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -94,21 +94,21 @@
* object that the page belongs to (O), the pool lock for the page (P),
* or the lock for either the free or paging queues (Q). If a field is
* annotated below with two of these locks, then holding either lock is
- * sufficient for read access, but both locks are required for write
+ * sufficient for read access, but both locks are required for write
* access.
*
- * In contrast, the synchronization of accesses to the page's dirty field
- * is machine dependent (M). In the machine-independent layer, the lock
- * on the object that the page belongs to must be held in order to
- * operate on the field. However, the pmap layer is permitted to set
- * all bits within the field without holding that lock. Therefore, if
- * the underlying architecture does not support atomic read-modify-write
- * operations on the field's type, then the machine-independent layer
- * must also hold the page queues lock when performing read-modify-write
- * operations and the pmap layer must hold the page queues lock when
- * setting the field. In the machine-independent layer, the
- * implementation of read-modify-write operations on the field is
- * encapsulated in vm_page_clear_dirty_mask().
+ * In contrast, the synchronization of accesses to the page's
+ * dirty field is machine dependent (M). In the
+ * machine-independent layer, the lock on the object that the
+ * page belongs to must be held in order to operate on the field.
+ * However, the pmap layer is permitted to set all bits within
+ * the field without holding that lock. If the underlying
+ * architecture does not support atomic read-modify-write
+ * operations on the field's type, then the machine-independent
+ * layer uses 32bit atomic on the aligned 32bit word that
+ * contains the dirty field. In the machine-independent layer,
+ * the implementation of read-modify-write operations on the
+ * field is encapsulated in vm_page_clear_dirty_mask().
*/
TAILQ_HEAD(pglist, vm_page);
OpenPOWER on IntegriCloud