[lkml]   [2001]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject2.4.0 i386: Why free_xxx_slow() instead free_xxx_fast()?

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
( 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?


Uli Kunitz

--- linux-2.4.0/include/asm-i386/pgalloc.h Tue Jan 9 15:00:08 2001
+++ linux/include/asm-i386/pgalloc.h Thu Jan 11 17:30:55 2001
@@ -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
Ulrich Kunitz (
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.030 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site