Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110738725
D20542.id58483.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D20542.id58483.diff
View Options
Index: head/sys/vm/vm_map.c
===================================================================
--- head/sys/vm/vm_map.c
+++ head/sys/vm/vm_map.c
@@ -454,18 +454,17 @@
/*
* Switch between vmspaces in an AIO kernel process.
*
- * The AIO kernel processes switch to and from a user process's
- * vmspace while performing an I/O operation on behalf of a user
- * process. The new vmspace is either the vmspace of a user process
- * obtained from an active AIO request or the initial vmspace of the
- * AIO kernel process (when it is idling). Because user processes
- * will block to drain any active AIO requests before proceeding in
- * exit() or execve(), the vmspace reference count for these vmspaces
- * can never be 0. This allows for a much simpler implementation than
- * the loop in vmspace_acquire_ref() above. Similarly, AIO kernel
- * processes hold an extra reference on their initial vmspace for the
- * life of the process so that this guarantee is true for any vmspace
- * passed as 'newvm'.
+ * The new vmspace is either the vmspace of a user process obtained
+ * from an active AIO request or the initial vmspace of the AIO kernel
+ * process (when it is idling). Because user processes will block to
+ * drain any active AIO requests before proceeding in exit() or
+ * execve(), the reference count for vmspaces from AIO requests can
+ * never be 0. Similarly, AIO kernel processes hold an extra
+ * reference on their initial vmspace for the life of the process. As
+ * a result, the 'newvm' vmspace always has a non-zero reference
+ * count. This permits an additional reference on 'newvm' to be
+ * acquired via a simple atomic increment rather than the loop in
+ * vmspace_acquire_ref() above.
*/
void
vmspace_switch_aio(struct vmspace *newvm)
@@ -490,9 +489,6 @@
/* Activate the new mapping. */
pmap_activate(curthread);
- /* Remove the daemon's reference to the old address space. */
- KASSERT(oldvm->vm_refcnt > 1,
- ("vmspace_switch_aio: oldvm dropping last reference"));
vmspace_free(oldvm);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 12:49 PM (8 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16796860
Default Alt Text
D20542.id58483.diff (2 KB)
Attached To
Mode
D20542: Remove an overly-aggressive assertion.
Attached
Detach File
Event Timeline
Log In to Comment