Date: Wed, 02 Aug 2023 11:36:50 +0200 From: Kristof Provost <kp@FreeBSD.org> To: Doug Moore <dougm@FreeBSD.org> 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 Message-ID: <A6B7E41F-891E-4C9D-B37B-17E5B3A3C6E0@FreeBSD.org> In-Reply-To: <202308020314.3723ETgj027830@gitrepo.freebsd.org> References: <202308020314.3723ETgj027830@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--=_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 <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 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 <!DOCTYPE html> <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"= > </head> <body><div style=3D"font-family: sans-serif;"><div class=3D"markdown" sty= le=3D"white-space: normal;"> <p dir=3D"auto">On 2 Aug 2023, at 5:14, Doug Moore wrote:</p> </div><div class=3D"plaintext" style=3D"white-space: normal;"><blockquote= style=3D"margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #136= BCE; color: #136BCE;"><p dir=3D"auto">The branch main has been updated by= dougm:</p> <p dir=3D"auto">URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D= 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c">https://cgit.FreeBSD.org/src/co= mmit/?id=3D1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c</a></p> <p dir=3D"auto">commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c <br> Author: Doug Moore <dougm@FreeBSD.org> <br> AuthorDate: 2023-08-02 03:12:00 +0000 <br> Commit: Doug Moore <dougm@FreeBSD.org> <br> CommitDate: 2023-08-02 03:12:00 +0000</p> <p dir=3D"auto"> vm_phys_enqueue_contig: handle npages=3D=3D0</p> <p dir=3D"auto"> By letting vm_phys_enqueue_contig handle the case whe= n npages =3D=3D 0, <br> the callers can stop checking it, and the compiler can stop <br> zero-checking with every call to ffs(). Letting vm_phys_enqueue_conti= g <br> call vm_phys_enqueue_contig for part of its work also saves a few <br> bytes.</p> <p dir=3D"auto"> The amd64 object code shrinks by 80 bytes.</p> <p dir=3D"auto"> Reviewed by: kib <br> Differential Revision: <a href=3D"https://reviews.freebsd.org/D41154= ">https://reviews.freebsd.org/D41154</a></p> </blockquote></div> <div class=3D"markdown" style=3D"white-space: normal;"> <p dir=3D"auto">I suspect this commit caused my machine to fail to boot:<= /p> <pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; border= : thin solid gray; overflow-x: auto; max-width: 90vw; background-color: #= E4E4E4;"><code style=3D"padding: 0 0.25em; background-color: #E4E4E4;">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 </code></pre> <p dir=3D"auto">This is sufficiently early in boot that I don=E2=80=99t g= et a core dump, so I hope the backtrace helps you.</p> <p dir=3D"auto">I=E2=80=99ll back out the commit locally and confirm.</p>= <p dir=3D"auto">Best regards,<br> Kristof</p> </div> </div> </body> </html> --=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A6B7E41F-891E-4C9D-B37B-17E5B3A3C6E0>