On Sun, Sep 06, 2009 at 05:37:52PM +0200, A.J. Fonz van Werven wrote:
> Kostik Belousov wrote:
>
> > I expect that the following patch, that is the partial merge of r194459,
> > would fix it. It patches sys/vm/vm_phys.c.
> >
> > Index: vm_phys.c
> > ===================================================================
> > --- vm_phys.c (revision 194458)
> > +++ vm_phys.c (revision 194459)
> > @@ -382,8 +382,7 @@
> > if (pa >= seg->start && pa < seg->end)
> > return (&seg->first_page[atop(pa - seg->start)]);
> > }
> > - panic("vm_phys_paddr_to_vm_page: paddr %#jx is not in any segment",
> > - (uintmax_t)pa);
> > + return (NULL);
> > }
> >
> > /*
>
> Hi,
>
> A quick grep on the file in question revealed that there are two
> functions that may panic() with "page not in any segment": the
> vm_phys_paddr_to_vm_page() being patched and also the next function
> vm_phys_paddr_to_segind(). I'm not exactly current with the memory
> management code so this may be a very stupid question, but I'll ask it
> anyway: don't both functions need to be patched?vm_phys_paddr_to_segind is used during vm bootstrap, the call sequence is vm_page_startup->vm_phys_add_page->vm_phys_paddr_to_segind. vm_page_startup calls vm_phys_add_page only for pages that should not cause the mentioned panic in vm_phys_paddr_to_segind, since it iterates over the pages of the segments created by vm_phys_create_seg() in vm_phys_init().
pgpx2GFet22ty.pgp
Description: PGP signature
