From owner-freebsd-alpha Sat Aug 14 22:24:23 1999 Delivered-To: freebsd-alpha@freebsd.org Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by hub.freebsd.org (Postfix) with ESMTP id 38AC3152BE for ; Sat, 14 Aug 1999 22:24:20 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: (from alc@localhost) by cs.rice.edu (8.9.0/8.9.0) id AAA11170; Sun, 15 Aug 1999 00:24:30 -0500 (CDT) Date: Sun, 15 Aug 1999 00:24:30 -0500 From: Alan Cox To: Matthew Jacob Cc: alpha@freebsd.org Subject: Re: more breakage... (fwd) Message-ID: <19990815002430.G27982@cs.rice.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5us In-Reply-To: ; from Matthew Jacob on Sat, Aug 14, 1999 at 06:18:58PM -0700 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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