DragonFly BSD
DragonFly bugs List (threaded) for 2005-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: page fault on 1.2.0-RELEASE


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Jun 2005 11:03:07 -0700 (PDT)

:I had the vm_paddr_t's as %#llx but changed them to %lld. when I tried
:to change npages to %lld, gcc complained. npages is a vm_size_t which
:I think is a unsigned int for x86. In any case, here is the printf
:
:printf("vm_page_startup:"
:	"\n\tfirst_page %#lx\n\tpage_range %lld\n\tnpages %d"
:	"\n\tend %lld\n\tnew_end %lld"
:	"\n\tvm_page_array %p\n\tmapped %#x\n",
:	first_page, page_range, npages, end, new_end, vm_page_array, mapped);

    Try this (patched against the RELEASE sources):

Index: vm_page.c
===================================================================
RCS file: /cvs/src/sys/vm/vm_page.c,v
retrieving revision 1.28
diff -u -r1.28 vm_page.c
--- vm_page.c	10 Dec 2004 23:07:10 -0000	1.28
+++ vm_page.c	14 Jun 2005 18:02:49 -0000
@@ -169,8 +169,11 @@
 	m->flags = 0;
 	m->pc = (pa >> PAGE_SHIFT) & PQ_L2_MASK;
 	m->queue = m->pc + PQ_FREE;
+	printf("ADD_PAGE PA %08llx PC %d QUEUE %d\n",
+		(long long)pa, (int)m->pc, (int)m->queue);
 
 	vpq = &vm_page_queues[m->queue];
+	printf("VPQ %p/%p\n", vm_page_queues, vpq);
 	if (vpq->flipflop)
 		TAILQ_INSERT_TAIL(&vpq->pl, m, pageq);
 	else
@@ -218,6 +221,8 @@
 	for (i = 0; phys_avail[i + 1]; i += 2) {
 		phys_avail[i] = round_page(phys_avail[i]);
 		phys_avail[i + 1] = trunc_page(phys_avail[i + 1]);
+		printf("PHYS_AVAIL %08llx - %08llx\n",
+			phys_avail[i], phys_avail[i+1]);
 	}
 
 	for (i = 0; phys_avail[i + 1]; i += 2) {
@@ -230,6 +235,9 @@
 		++nblocks;
 		total += size;
 	}
+	printf("BIGGESTONE %lld SIZE %lld\n", biggestone, biggestsize);
+	printf("NBLOCKS %d\n", nblocks);
+	printf("TOTAL %lld\n", total);
 
 	end = phys_avail[biggestone+1];
 
@@ -264,6 +272,8 @@
 	vm_page_bucket_count <<= 1;
 	vm_page_hash_mask = vm_page_bucket_count - 1;
 
+	printf("VM_PAGE_BUCKET_COUNT %d\n", vm_page_bucket_count);
+
 	/*
 	 * Validate these addresses.
 	 */
@@ -272,9 +282,12 @@
 	mapped = round_page(vaddr);
 	vaddr = pmap_map(mapped, new_end, end,
 	    VM_PROT_READ | VM_PROT_WRITE);
+	printf("MAP1 %08x/%08x PHYS %08llx - %08llx\n", mapped, vaddr,
+		new_end, end);
 	vaddr = round_page(vaddr);
 	bzero((caddr_t) mapped, vaddr - mapped);
 
+
 	for (i = 0; i < vm_page_bucket_count; i++) {
 		*bucket = NULL;
 		bucket++;
@@ -292,6 +305,8 @@
 
 	end = new_end;
 
+	printf("FIRST_PAGE %ld PAGE_RANGE %lld\n", first_page, page_range);
+
 	/*
 	 * Initialize the mem entry structures now, and put them in the free
 	 * queue.
@@ -306,6 +321,10 @@
 	mapped = pmap_map(mapped, new_end, end,
 	    VM_PROT_READ | VM_PROT_WRITE);
 
+	printf("VM_PAGE_ARRAY @ KVA %p PHYS %08llx - %08llx\n",
+		mv_page_array, new_end, end);
+	printf("VM_PAGE_ARRAY HAS %lld ENTRIES\n", page_range);
+
 	/*
 	 * Clear all of the page structures
 	 */



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]