Author: markj Date: Fri Sep 27 16:41:34 2019 New Revision: 352800 URL: https://svnweb.freebsd.org/changeset/base/352800
Log: Fix object locking in vm_object_unwire() after r352174. Now, vm_page_busy_sleep() expects the page's object to be locked. vm_object_unwire() does some unusual lazy locking of the object chain and keeps objects locked until a busy page is encountered or the loop terminates. When a busy page is encountered, rather than unlocking all but the "bottom-level" object, we must instead skip the object to which "tm" belongs. Reported and tested by: pho Reviewed by: kib Discussed with: jeff Sponsored by: Intel, Netflix Differential Revision: https://reviews.freebsd.org/D21790 Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Sep 27 16:35:08 2019 (r352799) +++ head/sys/vm/vm_object.c Fri Sep 27 16:41:34 2019 (r352800) @@ -2169,10 +2169,11 @@ again: m = TAILQ_NEXT(m, listq); } if (vm_page_xbusied(tm)) { - for (tobject = object; locked_depth > 1; + for (tobject = object; locked_depth >= 1; locked_depth--) { t1object = tobject->backing_object; - VM_OBJECT_RUNLOCK(tobject); + if (tm->object != tobject) + VM_OBJECT_RUNLOCK(tobject); tobject = t1object; } vm_page_busy_sleep(tm, "unwbo", true); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"