Page MenuHomeFreeBSD

Wake shared waiters on LK_DOWNGRADE
Needs ReviewPublic

Authored by mlaier on Apr 9 2015, 9:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 12:39 AM
Unknown Object (File)
Dec 15 2023, 2:45 PM
Unknown Object (File)
Dec 9 2023, 5:39 PM
Unknown Object (File)
Sep 26 2023, 7:11 AM
Unknown Object (File)
Sep 19 2023, 6:45 PM
Unknown Object (File)
Apr 22 2023, 6:28 PM
Unknown Object (File)
Apr 7 2023, 1:25 PM
Unknown Object (File)
Mar 4 2023, 10:46 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

We lost this with the lockmgr rework. The logic here is to wake shared waiters unless there are exclusive waiters. Patch from Attilio. From EMC/Isilon.

Test Plan

Tested heavily on our version (which relies on shared locks more heavily, too).

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mlaier retitled this revision from to Wake shared waiters on LK_DOWNGRADE.
mlaier updated this object.
mlaier edited the test plan for this revision. (Show Details)

While testing this patch I noticed one NFS test, that triggered ~20.000 "waking up threads on the shared queue".

The details:
root@t2:~pho/stress2/misc #
KDB: enter: Break to debugger
[ thread pid 11 tid 100006 ]
Stopped at kdb_alt_break_internal+0x197: movq $0,kdb_why
db> x/d pho
pho: 0
db> c
root@t2:~pho/stress2/misc # /usr/bin/time -h ./crossmp2.sh
nfs server x4:/tmp: not responding

6m17.59s real           25.48s user             2m33.26s sys

root@t2:~pho/stress2/misc # KDB: enter: Break to debugger
[ thread pid 11 tid 100006 ]
Stopped at kdb_alt_break_internal+0x197: movq $0,kdb_why
db> x/d pho
pho: 20506
db> c


LOCK_LOG2(lk,
    "%s: %p waking up threads on the shared queue",
    __func__, lk);
pho++;

Tested on r285787M. No other "issues" observed.