diff options
author | David S. Miller <davem@davemloft.net> | 2006-01-31 21:30:27 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:11:14 -0500 |
commit | 3c936465249f863f322154ff1aaa628b84ee5750 (patch) | |
tree | 2bd7a229236f197d20a655133370e5d0c1bf886c /arch/sparc64/mm | |
parent | 05e28f9de65a38bb0c769080e91b6976e7e1e70c (diff) |
[SPARC64]: Kill pgtable quicklists and use SLAB.
Taking a nod from the powerpc port.
With the per-cpu caching of both the page allocator and SLAB, the
pgtable quicklist scheme becomes relatively silly and primitive.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/mm')
-rw-r--r-- | arch/sparc64/mm/init.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 936ae1a594ac..7c456afaa9a5 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -141,26 +141,25 @@ unsigned long sparc64_kern_sec_context __read_mostly; | |||
141 | 141 | ||
142 | int bigkernel = 0; | 142 | int bigkernel = 0; |
143 | 143 | ||
144 | /* XXX Tune this... */ | 144 | kmem_cache_t *pgtable_cache __read_mostly; |
145 | #define PGT_CACHE_LOW 25 | ||
146 | #define PGT_CACHE_HIGH 50 | ||
147 | 145 | ||
148 | #ifndef CONFIG_SMP | 146 | static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags) |
149 | struct pgtable_cache_struct pgt_quicklists; | 147 | { |
150 | #endif | 148 | clear_page(addr); |
149 | } | ||
151 | 150 | ||
152 | void check_pgt_cache(void) | 151 | void pgtable_cache_init(void) |
153 | { | 152 | { |
154 | preempt_disable(); | 153 | pgtable_cache = kmem_cache_create("pgtable_cache", |
155 | if (pgtable_cache_size > PGT_CACHE_HIGH) { | 154 | PAGE_SIZE, PAGE_SIZE, |
156 | do { | 155 | SLAB_HWCACHE_ALIGN | |
157 | if (pgd_quicklist) | 156 | SLAB_MUST_HWCACHE_ALIGN, |
158 | free_pgd_slow(get_pgd_fast()); | 157 | zero_ctor, |
159 | if (pte_quicklist) | 158 | NULL); |
160 | free_pte_slow(pte_alloc_one_fast()); | 159 | if (!pgtable_cache) { |
161 | } while (pgtable_cache_size > PGT_CACHE_LOW); | 160 | prom_printf("pgtable_cache_init(): Could not create!\n"); |
161 | prom_halt(); | ||
162 | } | 162 | } |
163 | preempt_enable(); | ||
164 | } | 163 | } |
165 | 164 | ||
166 | #ifdef CONFIG_DEBUG_DCFLUSH | 165 | #ifdef CONFIG_DEBUG_DCFLUSH |
@@ -340,7 +339,6 @@ void show_mem(void) | |||
340 | nr_swap_pages << (PAGE_SHIFT-10)); | 339 | nr_swap_pages << (PAGE_SHIFT-10)); |
341 | printk("%ld pages of RAM\n", num_physpages); | 340 | printk("%ld pages of RAM\n", num_physpages); |
342 | printk("%d free pages\n", nr_free_pages()); | 341 | printk("%d free pages\n", nr_free_pages()); |
343 | printk("%d pages in page table cache\n",pgtable_cache_size); | ||
344 | } | 342 | } |
345 | 343 | ||
346 | void mmu_info(struct seq_file *m) | 344 | void mmu_info(struct seq_file *m) |