summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-09-18 15:03:31 +0000
committerkib <kib@FreeBSD.org>2010-09-18 15:03:31 +0000
commitd25cc0d8783c134a0201e3b7b1a2f8635afd54bb (patch)
tree8328cdf8301c6d159bb10e1a5a03b15f0b932857 /sys/vm/vm_map.h
parent7066648caf203091037ddc9dc452bcb0ef9aad45 (diff)
downloadFreeBSD-src-d25cc0d8783c134a0201e3b7b1a2f8635afd54bb.zip
FreeBSD-src-d25cc0d8783c134a0201e3b7b1a2f8635afd54bb.tar.gz
Adopt the deferring of object deallocation for the deleted map entries
on map unlock to the lock downgrade and later read unlock operation. System map entries cannot be backed by OBJT_VNODE objects, no need to defer deallocation for them. Map entries from user maps do not require the owner map for deallocation, and can be accumulated in the thread-local list for freeing when a user map is unlocked. Move the collection of entries for deferred reclamation into vm_map_delete(). Create helper vm_map_process_deferred(), that is called from locations where processing is feasible. Do not process deferred entries in vm_map_unlock_and_wait() since map_sleep_mtx is held. Reviewed by: alc, rstone (previous versions) Tested by: pho MFC after: 2 weeks
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r--sys/vm/vm_map.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index d5c5b51..292522e 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -185,7 +185,6 @@ struct vm_map {
vm_flags_t flags; /* flags for this vm_map */
vm_map_entry_t root; /* Root of a binary search tree */
pmap_t pmap; /* (c) Physical map */
- vm_map_entry_t deferred_freelist;
#define min_offset header.start /* (c) */
#define max_offset header.end /* (c) */
};
@@ -267,6 +266,7 @@ vmspace_pmap(struct vmspace *vmspace)
void _vm_map_lock(vm_map_t map, const char *file, int line);
void _vm_map_unlock(vm_map_t map, const char *file, int line);
+void _vm_map_unlock_nodefer(vm_map_t map, const char *file, int line);
void _vm_map_lock_read(vm_map_t map, const char *file, int line);
void _vm_map_unlock_read(vm_map_t map, const char *file, int line);
int _vm_map_trylock(vm_map_t map, const char *file, int line);
@@ -279,6 +279,8 @@ void vm_map_wakeup(vm_map_t map);
#define vm_map_lock(map) _vm_map_lock(map, LOCK_FILE, LOCK_LINE)
#define vm_map_unlock(map) _vm_map_unlock(map, LOCK_FILE, LOCK_LINE)
+#define vm_map_unlock_nodefer(map) \
+ _vm_map_unlock_nodefer(map, LOCK_FILE, LOCK_LINE)
#define vm_map_lock_read(map) _vm_map_lock_read(map, LOCK_FILE, LOCK_LINE)
#define vm_map_unlock_read(map) _vm_map_unlock_read(map, LOCK_FILE, LOCK_LINE)
#define vm_map_trylock(map) _vm_map_trylock(map, LOCK_FILE, LOCK_LINE)
OpenPOWER on IntegriCloud