Skip to contentSkip to conversation

pmd_large vs. pmd_huge

PATCH Pete Zaitcev 1 participant 1 message Jul 28, 2003 Memory management

lore
Share & tools
lore
#0 lore raw

I looked at the 2.6.0-test2 to find out the difference between large and huge pages, but it seems they are one and the same. The ia64 only implements pmd_huge, so how about just going with that everywhere? For starters, we can do this to strike down an evil #ifdef:

mm/slab.c +3 -4
diff -urN -X dontdiff linux-2.6.0-test1-bk2/mm/slab.c linux-2.6.0-test1-bk2-nip/mm/slab.c
@@ -91,6 +91,7 @@
 #include	<linux/cpu.h>
 #include	<linux/sysctl.h>
 #include	<linux/module.h>
+#include	<linux/hugetlb.h>
 
 #include	<asm/uaccess.h>
 #include	<asm/cacheflush.h>
@@ -2728,12 +2729,10 @@
 			printk("No pmd.\n");
 			break;
 		}
-#ifdef CONFIG_X86
-		if (pmd_large(*pmd)) {
-			printk("Large page.\n");
+		if (pmd_huge(*pmd)) {
+			printk("Huge page.\n");
 			break;
 		}
-#endif
 		printk("normal page, pte_val 0x%llx\n",
 		  (unsigned long long)pte_val(*pte_offset_kernel(pmd, addr)));
 	} while(0);