From nobody Wed Aug 2 09:36:50 2023 X-Original-To: dev-commits-src-main@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 4RG7jr1M6fz4qVN2; Wed, 2 Aug 2023 10:38:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG6Ly3KHmz41h4; Wed, 2 Aug 2023 09:36:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7bAf8yy25riDDvmEH8ZWIRli49jXArbPTrukOX6ir8Q=; b=INxrfxQWA9WGoC5us0Y4HerMEDvCF/Tn+kNcLCP0Hn4eo5kgIpUOhuo88kbcoQBdN44d0/ WNoeQBJIeSVTQows5rAbcKuKrc4wirHet8QEUNz5rJu1rL3AAoC4bxhTo2JS4phpw32GLz WwMnuhpuPH1A/qa+jPPoCxvyPXh2+26zI0OJ8R+E57tP1o0fZQSX5Nbmzc8Q+FU5mbKIGR gOmcHchGgoD4xIuwPro8IC5gVLcdcYeR9M9ONdzD33xEk6BoYIdMY036nGldoJ38qhQ9fm vGHbg9PKvSTs4/oEUEPPKHWK4MNmFomaR5JUdSt9mP1+0oyAslBsixTCm+rtIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690969018; a=rsa-sha256; cv=none; b=r5UsUOXolzcCwvMIz7UZe7l9RJpBWFnqEML9De1lhe2GaFLMVk23pYA7NxDuV658lyuDkI +L14dO9qUnZDnw+/unCT+7yRoZTrQZ+OThkt9gjVjPko0kGeax0z32cz2NP3yVACHyVc8z SVU4ikLl7KkISTs6sbPsI/xCDfH6P/l/M6qk7iyMXwf66Tnl7xNWduNQDj2c+TBbSae3S/ VrGXrwg53AblLNOltudwFgvI0zR6tN2Yfg1ZLgqxErnTcOyaFQyQQdnY7WHE3ZQA+nSI7e cWy4+8vEYzPOEWI3AFtn3q7GXu0i4gMI9k3qWZxEOVWhALFbyP8My2dxoMuTCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7bAf8yy25riDDvmEH8ZWIRli49jXArbPTrukOX6ir8Q=; b=NbNrLEHpWoYCO86Dd822IYpVYk8+KoWlf+rg00YVifzAWDu2PIFYxO/SZyEuuLyKHSMtbR zCBhIfni6dO3TIodM3x3h6Z2BoVJ9osaBGJGnu+R8Vrs8pCnA3YjXZq+hjuFiZdydTmG2U 7bXJufP72yvwFjNprJ3ywnPwRfX8xlCLBbtPnJX5v0Dpq1pmo6f8j6pL5PQk7+/T+aYphJ 3Uy/bBMIx/HImN9t/O+N072TnDvh9y/OsdLHAMk9l09Evj/f0b70VcyU3lj5XQ/UZZf/xS R3Qp2p34XIdc1oEC9bYPHSK1mPVxfc+4FBHcfCt1fwNcaZkEMPAWge2J/zQXvA== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RG6Lw4PP5z19gH; Wed, 2 Aug 2023 09:36:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id DDB144D36B; Wed, 2 Aug 2023 11:36:51 +0200 (CEST) From: Kristof Provost To: Doug Moore Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1a7fcf6d51eb - main - vm_phys_enqueue_contig: handle npages==0 Date: Wed, 02 Aug 2023 11:36:50 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <202308020314.3723ETgj027830@gitrepo.freebsd.org> References: <202308020314.3723ETgj027830@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_=" --=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2 Aug 2023, at 5:14, Doug Moore wrote: > The branch main has been updated by dougm: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D1a7fcf6d51eb67ee3e05fdbb806f7= e68f9f53c9c > > commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c > Author: Doug Moore > AuthorDate: 2023-08-02 03:12:00 +0000 > Commit: Doug Moore > CommitDate: 2023-08-02 03:12:00 +0000 > > vm_phys_enqueue_contig: handle npages=3D=3D0 > > By letting vm_phys_enqueue_contig handle the case when npages =3D=3D= = > 0, > the callers can stop checking it, and the compiler can stop > zero-checking with every call to ffs(). Letting = > vm_phys_enqueue_contig > call vm_phys_enqueue_contig for part of its work also saves a few > bytes. > > The amd64 object code shrinks by 80 bytes. > > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D41154 I suspect this commit caused my machine to fail to boot: WARNING: WITNESS option enabled, expect reduced performance.c = data=3D0x180 data=3D0x panic: vm_phys_enq_range: page 0xfffffe0000006180 and npages 4294967040 = are misaligned cpuid =3D 0onfigured modules... time =3D 1rnel/if_bnxt.ko size 0x3efe8 at 0x1f50000 KDB: stack backtrace:ize 0x6f2698 at 0x1f8f000 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffffff82c03e20 vpanic() at vpanic+0x149/frame 0xffffffff82c03e70 panic() at panic+0x43/frame 0xffffffff82c03ed00 vm_phys_enq_range() at vm_phys_enq_range+0x11d/frame 0xffffffff82c03ee0 vm_phys_enqueue_contig() at vm_phys_enqueue_contig+0xdd/frame = 0xffffffff82c03f20 vm_page_startup() at vm_page_startup+0xf3d/frame 0xffffffff82c03f90 vm_mem_init() at vm_mem_init+0x1a/frame 0xffffffff82c03fa0 mi_startup() at mi_startup+0x1f1/frame 0xffffffff82c03ff0 btext() at btext+0x23 KDB: enter: panic This is sufficiently early in boot that I don=E2=80=99t get a core dump, = so I = hope the backtrace helps you. I=E2=80=99ll back out the commit locally and confirm. Best regards, Kristof --=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 2 Aug 2023, at 5:14, Doug Moore wrote:

The branch main has been updated by= dougm:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3D1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c

commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c
Author: Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2023-08-02 03:12:00 +0000
Commit: Doug Moore <dougm@FreeBSD.org>
CommitDate: 2023-08-02 03:12:00 +0000

vm_phys_enqueue_contig: handle npages=3D=3D0

By letting vm_phys_enqueue_contig handle the case whe= n npages =3D=3D 0,
the callers can stop checking it, and the compiler can stop
zero-checking with every call to ffs(). Letting vm_phys_enqueue_conti= g
call vm_phys_enqueue_contig for part of its work also saves a few
bytes.

The amd64 object code shrinks by 80 bytes.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D41154

I suspect this commit caused my machine to fail to boot:<= /p>

WA=
RNING: WITNESS option enabled, expect reduced performance.c data=3D0x180 =
data=3D0x
panic: vm_phys_enq_range: page 0xfffffe0000006180 and npages 4294967040 a=
re misaligned
cpuid =3D 0onfigured modules...
time =3D 1rnel/if_bnxt.ko size 0x3efe8 at 0x1f50000
KDB: stack backtrace:ize 0x6f2698 at 0x1f8f000
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff82c=
03e20
vpanic() at vpanic+0x149/frame 0xffffffff82c03e70
panic() at panic+0x43/frame 0xffffffff82c03ed00
vm_phys_enq_range() at vm_phys_enq_range+0x11d/frame 0xffffffff82c03ee0
vm_phys_enqueue_contig() at vm_phys_enqueue_contig+0xdd/frame 0xffffffff8=
2c03f20
vm_page_startup() at vm_page_startup+0xf3d/frame 0xffffffff82c03f90
vm_mem_init() at vm_mem_init+0x1a/frame 0xffffffff82c03fa0
mi_startup() at mi_startup+0x1f1/frame 0xffffffff82c03ff0
btext() at btext+0x23
KDB: enter: panic

This is sufficiently early in boot that I don=E2=80=99t g= et a core dump, so I hope the backtrace helps you.

I=E2=80=99ll back out the commit locally and confirm.

=

Best regards,
Kristof

--=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_=--