From nobody Sat Sep 24 13:38:18 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 4MZVTR0mfjz4cgmd; Sat, 24 Sep 2022 13:38:19 +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 4MZVTQ737gz42DG; Sat, 24 Sep 2022 13:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664026699; 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=bC038BGXczD8PBu0g8Z6WAWM2GZ+vnKpq17QHZtZoek=; b=uOvoICHaXMLOPDi2sTfvPoUUtIQiQfrN6IDYpGu6eMZJJZYEeb/F5i95PKaBrFrHMZmecv 9z5krA+EoNA3/u8ezrbe4yiJgtxmk1HdW13sbUfaewXrEwBfGE4KpzLiFbReQXXpeGoUvW CvLkLM4G8cmUyetC7A6wCxD3xUx8qpwosZO2h7EQdDRqHOhM1XykQaW2oVRvRLSzUhotug tb3b/yR4qnHypqfxbgGAyADoOgYCwRNvJGrquBLKXjxgzkW/kj0EH2NI4ZlNEFone3SoTD OGTNPkQk0ylfDBoGqeghsiD4gW+ntS9rNVpGHCttVlrkULyHHjI8QLCoCWMxSw== 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 4MZVTQ62N2z15TB; Sat, 24 Sep 2022 13:38:18 +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 28ODcIvX023650; Sat, 24 Sep 2022 13:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28ODcIM0023649; Sat, 24 Sep 2022 13:38:18 GMT (envelope-from git) Date: Sat, 24 Sep 2022 13:38:18 GMT Message-Id: <202209241338.28ODcIM0023649@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: 4551cbbe9906 - main - amd64: Ignore 1GB mappings in pmap_advise() 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: 4551cbbe9906812556501c541fef0d88b0398b27 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664026699; 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=bC038BGXczD8PBu0g8Z6WAWM2GZ+vnKpq17QHZtZoek=; b=wdIddEIQUwsE4dWUM/ars6jdxEn/+vEZZSo4MoZKPSXzCrSePIUDpN3zTQG86Fdd0BsG+t Y3lVFnz4pwijGASpiynkPgLmnlwoipViRQNoC+VO7wMd+tZnNmWNGstGmZgzAuLcemYFk1 ry1jdIwUL1wBKdqCVGB5HZlDPV/Wx3nSN+rYUpBnK2MCIglgVpuzRjmLbKKydtAZ0LaHUM ejZbcYZOOTMdYArh72ahWQ8HiokxQbphHrvuchp000UlYqyhfAaSy2rfluZ6sEONCN93qX ZZhZu/f62klDliiMcHlIxqSUUABXorLUXzGOLsewdncJuVQg+50s5rQwdW7eZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664026699; a=rsa-sha256; cv=none; b=V8xX6qskB2pAD+treDWaeV8Hc1Nw/mhoYoIJ5oKBzhMEMKjjnwQY+3S2pvXESrMp8IOWRM cWbTkIWQcBS8siyzfyRAZA40059b7zYKqsXQQ+nDHfbsY12YssosD/Tg0hjNMGkQ7LlDzj gZo1HTYTvhD0/a92eRIuHnfBViYAEbh1GxXg1f/SNlPDK9mpjutcAsVPdxVddcw3zBBgYY eF1dfdQQYSX2Clu95D7SuzHx86fgnEb27KY/GaKiiBKD+VLQ2vBLXVTGJlGK3G8fxCAusw OFkO56rcR+Fqjv8uGk52YWM4LhUqcOZgaKrEd474VJgz6zAJm/MvKJvf7HSdzg== 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=4551cbbe9906812556501c541fef0d88b0398b27 commit 4551cbbe9906812556501c541fef0d88b0398b27 Author: Mark Johnston AuthorDate: 2022-09-24 13:20:48 +0000 Commit: Mark Johnston CommitDate: 2022-09-24 13:28:41 +0000 amd64: Ignore 1GB mappings in pmap_advise() This assertion can be triggered by usermode since vm_map_madvise() doesn't force advice to be applied to an entire largepage mapping. I can't see any reason not to permit it, however, since MADV_DONTNEED and _FREE are advisory and we can simply do nothing when a 1GB mapping is encountered. Reviewed by: alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36675 --- sys/amd64/amd64/pmap.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 358d016676d2..f4df664f0cca 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -9013,13 +9013,8 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) pdpe = pmap_pml4e_to_pdpe(pml4e, sva); if ((*pdpe & PG_V) == 0) continue; - if ((*pdpe & PG_PS) != 0) { - KASSERT(va_next <= eva, - ("partial update of non-transparent 1G mapping " - "pdpe %#lx sva %#lx eva %#lx va_next %#lx", - *pdpe, sva, eva, va_next)); + if ((*pdpe & PG_PS) != 0) continue; - } va_next = (sva + NBPDR) & ~PDRMASK; if (va_next < sva)