Use |= rather than += when aggregrating requests to wakeup the swapper.
What we really want is an inclusive or of all the requests, and += can in theory roll over to 0.
This commit is contained in:
parent
4b3963629c
commit
814f26da8a
@ -499,7 +499,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
|
||||
* We have been unable to succeed in upgrading, so just
|
||||
* give up the shared lock.
|
||||
*/
|
||||
wakeup_swapper += wakeupshlk(lk, file, line);
|
||||
wakeup_swapper |= wakeupshlk(lk, file, line);
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case LK_EXCLUSIVE:
|
||||
@ -787,7 +787,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
|
||||
"%s: %p waking up all threads on the %s queue",
|
||||
__func__, lk, queue == SQ_SHARED_QUEUE ?
|
||||
"shared" : "exclusive");
|
||||
wakeup_swapper += sleepq_broadcast(
|
||||
wakeup_swapper |= sleepq_broadcast(
|
||||
&lk->lock_object, SLEEPQ_LK, 0, queue);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user