sh: Move page table allocation out of line

We also switched away from quicklists and instead moved to slab
caches. After benchmarking both implementations the difference is
negligible. The slab caches suit us better though because the size of a
pgd table is just 4 entries when we're using a 3-level page table layout
and quicklists always deal with pages.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
This commit is contained in:
Matt Fleming
2009-12-31 12:19:24 +00:00
parent b4c8927623
commit 2a5eacca85
6 changed files with 66 additions and 78 deletions

View File

@@ -6,10 +6,13 @@
#define QUICK_PT 1 /* Other page table pages that are zero on free */
extern pgd_t *pgd_alloc(struct mm_struct *);
extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
#ifdef CONFIG_PGTABLE_LEVELS_3
#include <asm/pgalloc_pmd.h>
#else
#include <asm/pgalloc_nopmd.h>
extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd);
extern pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address);
extern void pmd_free(struct mm_struct *mm, pmd_t *pmd);
#endif
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
@@ -67,7 +70,6 @@ do { \
static inline void check_pgt_cache(void)
{
__check_pgt_cache();
quicklist_trim(QUICK_PT, NULL, 25, 16);
}