--- linux-2.5.27-rmap/fs/proc/proc_misc.c~ Mon Jul 22 18:21:23 2002 +++ linux-2.5.27-rmap/fs/proc/proc_misc.c Mon Jul 22 18:24:22 2002 @@ -164,7 +164,7 @@ "Dirty: %8lu kB\n" "Writeback: %8lu kB\n" "PageTables: %8lu kB\n" - "ReverseMaps: %8lu\n", + "ReverseMaps: %8lu\n", K(i.totalram), K(i.freeram), K(i.sharedram), @@ -183,7 +183,7 @@ K(ps.nr_dirty), K(ps.nr_writeback), K(ps.nr_page_table_pages), - K(ps.nr_reverse_maps) + ps.nr_reverse_maps ); return proc_calc_metrics(page, start, off, count, eof, len); --- linux-2.5.27-rmap/mm/rmap.c~ Mon Jul 22 18:21:24 2002 +++ linux-2.5.27-rmap/mm/rmap.c Mon Jul 22 18:30:29 2002 @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -54,7 +53,6 @@ }; static kmem_cache_t *pte_chain_cache; -static mempool_t *pte_chain_pool; static inline struct pte_chain * pte_chain_alloc(void); static inline void pte_chain_free(struct pte_chain *, struct pte_chain *, struct page *); @@ -411,7 +409,7 @@ else if (page) page->pte.chain = pte_chain->next; - mempool_free(pte_chain, pte_chain_pool); + kmem_cache_free(pte_chain_cache, pte_chain); } /** @@ -421,23 +419,11 @@ * pte_chain structures as required. * Caller needs to hold the page's pte_chain_lock. */ -static inline struct pte_chain * pte_chain_alloc() +static inline struct pte_chain *pte_chain_alloc(void) { - return (struct pte_chain *)mempool_alloc(pte_chain_pool, GFP_ATOMIC); -} - -static void *pte_chain_pool_alloc(int gfp_mask, void *ignored) -{ - (void)gfp_mask; - (void)ignored; return kmem_cache_alloc(pte_chain_cache, GFP_ATOMIC); } -static void pte_chain_pool_free(void *pte_chain, void *ignored) -{ - kmem_cache_free(pte_chain_cache, pte_chain); -} - void __init pte_chain_init(void) { pte_chain_cache = kmem_cache_create( "pte_chain", @@ -449,12 +435,4 @@ if (!pte_chain_cache) panic("failed to create pte_chain cache!\n"); - - pte_chain_pool = mempool_create(16*1024, - pte_chain_pool_alloc, - pte_chain_pool_free, - NULL); - - if (!pte_chain_pool) - panic("Failed to create pte_chain mempool!\n"); }