From owner-svn-src-head@freebsd.org Fri Sep 27 16:41:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A9BD1277E5; Fri, 27 Sep 2019 16:41:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46fyHM2k8vz42cn; Fri, 27 Sep 2019 16:41:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41B461BC25; Fri, 27 Sep 2019 16:41:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8RGfZtN054306; Fri, 27 Sep 2019 16:41:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8RGfZbE054305; Fri, 27 Sep 2019 16:41:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201909271641.x8RGfZbE054305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 27 Sep 2019 16:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352800 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 352800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2019 16:41:35 -0000 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);