Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Aug 1999 00:24:30 -0500
From:      Alan Cox <alc@cs.rice.edu>
To:        Matthew Jacob <mjacob@feral.com>
Cc:        alpha@freebsd.org
Subject:   Re: more breakage... (fwd)
Message-ID:  <19990815002430.G27982@cs.rice.edu>
In-Reply-To: <Pine.BSF.4.05.9908141818010.72786-100000@semuta.feral.com>; from Matthew Jacob on Sat, Aug 14, 1999 at 06:18:58PM -0700
References:  <Pine.BSF.4.05.9908141818010.72786-100000@semuta.feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 14, 1999 at 06:18:58PM -0700, Matthew Jacob wrote:
> 
> 1.66 of vm_page.h caused this (very first call to contigmalloc). I've
> added back the old definitions if compiled under alpha- maybe you can
> figure out what the right fix is?
> 

Sigh, thanks.  contigmalloc1 incorrectly assumes that every entry
in the vm_page_array is a valid "struct vm_page".  In fact, this isn't
true.  Before my change the invalid entries were (probably) discarded
because "m->queue - m->pc" didn't match PQ_FREE or PQ_CACHE.
When I made PQ_FREE equal to zero,
the invalid entries (that are bzero'ed in vm_page_startup) appeared valid
to the following code:

                /*
                 * Find first page in array that is free, within range, aligned, and
                 * such that the boundary won't be crossed.
                 */
                for (i = start; i < cnt.v_page_count; i++) {
                        int pqtype;
                        phys = VM_PAGE_TO_PHYS(&pga[i]);
                        pqtype = pga[i].queue - pga[i].pc;
                        if (((pqtype == PQ_FREE) || (pqtype == PQ_CACHE)) &&
                            (phys >= low) && (phys < high) &&
                            ((phys & (alignment - 1)) == 0) &&
                            (((phys ^ (phys + size - 1)) & ~(boundary - 1)) == 0))
                                break;
                }

Alan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990815002430.G27982>