Date: Thu, 03 Aug 2023 20:22:16 -0500 From: Mike Karels <mike@karels.net> 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: c9b06fa52776 - main - vm_phys_enqueue_contig: handle npages==0 Message-ID: <870960EF-BC8B-4FD4-A428-BFC789DB39B1@karels.net> In-Reply-To: <202308031421.373ELqS8022332@gitrepo.freebsd.org> References: <202308031421.373ELqS8022332@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3 Aug 2023, at 9:21, Doug Moore wrote: > The branch main has been updated by dougm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc9b06fa52776fbf555b9397a= 8d28a54c957108ec > > commit c9b06fa52776fbf555b9397a8d28a54c957108ec > Author: Doug Moore <dougm@FreeBSD.org> > AuthorDate: 2023-08-03 14:19:48 +0000 > Commit: Doug Moore <dougm@FreeBSD.org> > CommitDate: 2023-08-03 14:19:48 +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_con= tig > call vm_phys_enqueue_contig for part of its work also saves a few > bytes. > > The amd64 object code shrinks by 128 bytes. > > Reviewed by: kib (previous version) > Tested by: pho > Differential Revision: https://reviews.freebsd.org/D41154 My machine panics like this during startup with this change in place agai= n: real memory =3D 68717379584 (65534 MB) panic: vm_phys_enq_range: page 0xfffffe006cdc8108 and npages 0 are misali= gned cpuid =3D 0 time =3D 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff831= 77ac0 vpanic() at vpanic+0x132/frame 0xffffffff83177bf0 panic() at panic+0x43/frame 0xffffffff83177c50 vm_phys_enq_range() at vm_phys_enq_range+0x12d/frame 0xffffffff83177c60 vm_phys_alloc_contig() at vm_phys_alloc_contig+0x557/frame 0xffffffff8317= 7cf0 vm_page_find_contig_domain() at vm_page_find_contig_domain+0xbe/frame 0xf= fffffff83177d60 vm_page_alloc_contig_domain() at vm_page_alloc_contig_domain+0x135/frame = 0xffffffff83177df0 kmem_alloc_contig_pages() at kmem_alloc_contig_pages+0x92/frame 0xfffffff= f83177e80 kmem_alloc_attr_domainset() at kmem_alloc_attr_domainset+0x20d/frame 0xff= ffffff83177f40 vm_ksubmap_init() at vm_ksubmap_init+0x65/frame 0xffffffff83177f80 cpu_startup() at cpu_startup+0x20b/frame 0xffffffff83177fa0 mi_startup() at mi_startup+0x1f1/frame 0xffffffff83177ff0 btext() at btext+0x23 KDB: enter: panic [ thread pid 0 tid 0 ] Stopped at kdb_enter+0x32: movq $0,0xe29533(%rip) db> If I comment out the assert, it boots and runs. Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?870960EF-BC8B-4FD4-A428-BFC789DB39B1>