Date: Fri, 27 Sep 2019 16:41:35 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352800 - head/sys/vm Message-ID: <201909271641.x8RGfZbE054305@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909271641.x8RGfZbE054305>