Skip to contentSkip to conversation

Add useful warning message in PPC64 hugepage code

PATCH David Gibson 1 participant 1 message Apr 1, 2004

lore
Share & tools
lore
#0 lore raw

Linus, please apply:

This patch adds a debugging message to the ppc64 hugepage code when we attempt to open the "low" (32-bit) hugepage window on PPC64, but can't because a (non-hugepage) mapping already exists in the region.

arch/ppc64/mm/hugetlbpage.c +4 -1
Index: working-2.6/arch/ppc64/mm/hugetlbpage.c
===================================================================
@@ -253,8 +253,11 @@
 	/* Check no VMAs are in the region */
 	vma = find_vma(mm, TASK_HPAGE_BASE_32);
 
-	if (vma && (vma->vm_start < TASK_HPAGE_END_32))
+	if (vma && (vma->vm_start < TASK_HPAGE_END_32)) {
+		printk(KERN_DEBUG "Low HTLB region busy: PID=%d  vma @ %lx-%lx\n",
+		       current->pid, vma->vm_start, vma->vm_end);
 		return -EBUSY;
+	}
 
 	/* Clean up any leftover PTE pages in the region */
 	spin_lock(&mm->page_table_lock);
Signature · 4 lines
David Gibson			| For every complex problem there is a
david AT gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson