Skip to contentSkip to conversation

2.4.0 i386: Why free_xxx_slow() instead free_xxx_fast()?

PATCH Ulrich Kunitz 1 participant 1 message Jan 20, 2001

lore
Share & tools
lore
#0 lore raw

Hello,

in include/asm-i386/pgalloc.h the {pgd,pmd,pte}_free* functions are defined as the functions free_{pgd,pmd,pte}_slow (see the patch below). IMO this leaves the quick lists pretty useless for i386. Have I overlooked something?

There is a linux-kernel mail from Martin Schwidefsky ([email protected]) about 2.4.0-test10 hinting on bad_pmd_table() and bad_pgd_table() landing in the quick lists. Using the _slow functions would fix any problem with the quick lists for now.

Changing the defines as in the patch seems to work here on a two uniprocessor machines (Pentium III, Athlon). I've checked with 2.4.1-pre9 too. But what are the risks?

Ciao,

Uli Kunitz

include/asm-i386/pgalloc.h +4 -4
@@ -92,9 +92,9 @@
 	free_page((unsigned long)pte);
 }
 
-#define pte_free_kernel(pte)    free_pte_slow(pte)
-#define pte_free(pte)	   free_pte_slow(pte)
-#define pgd_free(pgd)	   free_pgd_slow(pgd)
+#define pte_free_kernel(pte)    free_pte_fast(pte)
+#define pte_free(pte)	   free_pte_fast(pte)
+#define pgd_free(pgd)	   free_pgd_fast(pgd)
 #define pgd_alloc()	     get_pgd_fast()
 
 extern inline pte_t * pte_alloc_kernel(pmd_t * pmd, unsigned long address)
@@ -145,7 +145,7 @@
  * inside the pgd, so has no extra memory associated with it.
  * (In the PAE case we free the page.)
  */
-#define pmd_free(pmd)	   free_pmd_slow(pmd)
+#define pmd_free(pmd)	   free_pmd_fast(pmd)
 
 #define pmd_free_kernel		pmd_free
 #define pmd_alloc_kernel	pmd_alloc
Signature · 5 lines
Ulrich Kunitz ([email protected])
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/