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
This commit is contained in:
parent
9e53f3bd67
commit
6017827676
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341727
@ -3796,6 +3796,9 @@ umtx_shm_object_terminated(vm_object_t object)
|
|||||||
struct umtx_shm_reg *reg, *reg1;
|
struct umtx_shm_reg *reg, *reg1;
|
||||||
bool dofree;
|
bool dofree;
|
||||||
|
|
||||||
|
if (LIST_EMPTY(USHM_OBJ_UMTX(object)))
|
||||||
|
return;
|
||||||
|
|
||||||
dofree = false;
|
dofree = false;
|
||||||
mtx_lock(&umtx_shm_lock);
|
mtx_lock(&umtx_shm_lock);
|
||||||
LIST_FOREACH_SAFE(reg, USHM_OBJ_UMTX(object), ushm_obj_link, reg1) {
|
LIST_FOREACH_SAFE(reg, USHM_OBJ_UMTX(object), ushm_obj_link, reg1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user