Page MenuHomeFreeBSD

Wake shared waiters on LK_DOWNGRADE
Needs ReviewPublic

Authored by mlaier on Apr 9 2015, 9:52 PM.
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
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.