svn commit: r341727 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Sat Dec 8 14:04:59 UTC 2018
Author: mjg
Date: Sat Dec 8 14:04:57 2018
New Revision: 341727
URL: https://svnweb.freebsd.org/changeset/base/341727
Log:
umtx: avoid umtxshm locking on object termination if possible
Sample build world result on tmpfs:
kern.ipc.umtx_terminate_notempty: 0
kern.ipc.umtx_terminate_empty: 2891815
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/kern/kern_umtx.c
Modified: head/sys/kern/kern_umtx.c
==============================================================================
--- head/sys/kern/kern_umtx.c Sat Dec 8 12:52:09 2018 (r341726)
+++ head/sys/kern/kern_umtx.c Sat Dec 8 14:04:57 2018 (r341727)
@@ -3796,6 +3796,9 @@ umtx_shm_object_terminated(vm_object_t object)
struct umtx_shm_reg *reg, *reg1;
bool dofree;
+ if (LIST_EMPTY(USHM_OBJ_UMTX(object)))
+ return;
+
dofree = false;
mtx_lock(&umtx_shm_lock);
LIST_FOREACH_SAFE(reg, USHM_OBJ_UMTX(object), ushm_obj_link, reg1) {
More information about the svn-src-all
mailing list