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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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=1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c > > 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==0 > > By letting vm_phys_enqueue_contig handle the case when npages == > 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=0x180 data=0x panic: vm_phys_enq_range: page 0xfffffe0000006180 and npages 4294967040 are misaligned cpuid = 0onfigured modules... time = 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’t get a core dump, so I hope the backtrace helps you. I’ll back out the commit locally and confirm. Best regards, Kristof [-- Attachment #2 --] <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8"> </head> <body><div style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;"> <p dir="auto">On 2 Aug 2023, at 5:14, Doug Moore wrote:</p> </div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #136BCE; color: #136BCE;"><p dir="auto">The branch main has been updated by dougm:</p> <p dir="auto">URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c">https://cgit.FreeBSD.org/src/commit/?id=1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c</a></p> <p dir="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="auto"> vm_phys_enqueue_contig: handle npages==0</p> <p dir="auto"> By letting vm_phys_enqueue_contig handle the case when npages == 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_contig <br> call vm_phys_enqueue_contig for part of its work also saves a few <br> bytes.</p> <p dir="auto"> The amd64 object code shrinks by 80 bytes.</p> <p dir="auto"> Reviewed by: kib <br> Differential Revision: <a href="https://reviews.freebsd.org/D41154">https://reviews.freebsd.org/D41154</a></p> </blockquote></div> <div class="markdown" style="white-space: normal;"> <p dir="auto">I suspect this commit caused my machine to fail to boot:</p> <pre style="margin-left: 15px; margin-right: 15px; padding: 5px; border: thin solid gray; overflow-x: auto; max-width: 90vw; background-color: #E4E4E4;"><code style="padding: 0 0.25em; background-color: #E4E4E4;">WARNING: WITNESS option enabled, expect reduced performance.c data=0x180 data=0x panic: vm_phys_enq_range: page 0xfffffe0000006180 and npages 4294967040 are misaligned cpuid = 0onfigured modules... time = 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 </code></pre> <p dir="auto">This is sufficiently early in boot that I don’t get a core dump, so I hope the backtrace helps you.</p> <p dir="auto">I’ll back out the commit locally and confirm.</p> <p dir="auto">Best regards,<br> Kristof</p> </div> </div> </body> </html>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A6B7E41F-891E-4C9D-B37B-17E5B3A3C6E0>
