From nobody Thu Apr 14 19:49:07 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 476B01B35802; Thu, 14 Apr 2022 19:49:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KfVQX1Xglz4mcv; Thu, 14 Apr 2022 19:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649965748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GS7BDdPnJuYIG1lGMqeZ3T5vJv+AoN5sByE/iXl5l1g=; b=fBRUAf8QsiLVPf7Gt7XqQC9zfttr/5DCMUw76S8qMGbIxmJKSQKr6eNHki/0iMWXLAw43Y k5MLfiGqkLMReS1cQJJHucoTFLh5ZiXp92woQZ5k8sYoM1U/SIUPRstplBkP0Gia/FuHI6 6hlPFlm0IzoUsSBH6twvnAEe8B57sDXkCXw8Bp7eCh0Y0T5ABn2CrBwSj3pu1mMDhNRoXa nZlTuhCwSVGayAZ9g8rnniLtPIhGOL5Rd0x8l2TPlfujmn4+iQWBxTgGB8sRw82ACD6UVI bJHgWS8Cnz28hFE3b332yiAhOxGiErwpSxKKr5yfey6zjcf7gAqyLhqj+OcsXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 148FF2694C; Thu, 14 Apr 2022 19:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23EJn7X5054655; Thu, 14 Apr 2022 19:49:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23EJn7k8054654; Thu, 14 Apr 2022 19:49:07 GMT (envelope-from git) Date: Thu, 14 Apr 2022 19:49:07 GMT Message-Id: <202204141949.23EJn7k8054654@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6fb7c42d593d - main - vm: Move the "vm_wait in early boot" assertion to the proper place List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fb7c42d593d13eba8b72f6cdf434a7cb23fa828 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649965748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GS7BDdPnJuYIG1lGMqeZ3T5vJv+AoN5sByE/iXl5l1g=; b=phq2kpujbZWPk4nX5/ihdGjfF4nJNIUVT2nRbJPyTCs5qa6iuxsaeOuMDuzXt7IDb3DZCV rE7wrY6ty5o9xMWm2mPEtgBWQgqPRslJ42ySWQwDvTd1uiTm6dZIq24Los5YEhl5R5bdkY 7ed9QxOT4T8Ugn+lGFwKRiJ3YhX9dWQziaEs6BGVvBUS4I1Hc7V5/i6GiVW2rsXBg5L+L2 DW2+B8lDj1w2aofJuQVhT+kzV+Nu1KlGgzE8Nqfwd06mVWgKRnaEXcOe6MyixIF54JMy97 8ZWZ8GQqNlebMxO639umYFrHLNokkWmqi2alU7gM8rSN2O0zfaa+TNoV0mlPmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649965748; a=rsa-sha256; cv=none; b=R7Cmb+OuwutudGh/1+XqzCz4czr7d8RCCwvCo3VadzsukYeSjhkt0hIadYVx4vbjwLDfuk gktX7Eqwb+JfqGdHBYBefagYWvd97FdFB/+ol3G0A0e1W2A3AXCLxLUGh5LLzu1ea7BKvD ZVMjB2NkWXlj2CXFFu3SiUElFcrZ0B/79GFhB7+EsxzjFDJ1Oo93cjy4YgYqx3/gjZKeaT EnKyG4k0Lmz+kBqjum2FdSob0t33ZRPOVRJBGNwoq2jiP+HKjgJclqx/92JwsIp9X8Pyp8 tV/CI2CwY09yaU3lktbW07U1Q2wGLacAnYhSwGRcSZar45wELNW9OxOCYnsuJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6fb7c42d593d13eba8b72f6cdf434a7cb23fa828 commit 6fb7c42d593d13eba8b72f6cdf434a7cb23fa828 Author: Mark Johnston AuthorDate: 2022-04-14 19:45:54 +0000 Commit: Mark Johnston CommitDate: 2022-04-14 19:45:54 +0000 vm: Move the "vm_wait in early boot" assertion to the proper place The assertion was added in commit 1771e987ca6a. After that, vm_wait() and friends were refactored such that the actual sleep happens elsewhere. Now the assertion condition is not checked when vm_wait_doms() is called directly, and it is checked even if we are not going to sleep (because vm_page_count_min_set(wdoms) is false). Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34909 --- sys/vm/vm_page.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 50fe50ddb46c..6abee86a227d 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -3265,6 +3265,8 @@ vm_wait_doms(const domainset_t *wdoms, int mflags) */ mtx_lock(&vm_domainset_lock); if (vm_page_count_min_set(wdoms)) { + if (pageproc == NULL) + panic("vm_wait in early boot"); vm_min_waiters++; error = msleep(&vm_min_domains, &vm_domainset_lock, PVM | PDROP | mflags, "vmwait", 0); @@ -3298,8 +3300,6 @@ vm_wait_domain(int domain) } else mtx_unlock(&vm_domainset_lock); } else { - if (pageproc == NULL) - panic("vm_wait in early boot"); DOMAINSET_ZERO(&wdom); DOMAINSET_SET(vmd->vmd_domain, &wdom); vm_wait_doms(&wdom, 0);