From c1ab3459d0ce0820b4bcddfa55fde62bb88d13c1 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 28 Jul 2002 03:14:12 -0700 Subject: [PATCH] show_free_areas() cleanup Cleanup to show_free_areas() from Bill Irwin: show_free_areas() and show_free_areas_core() is a mess. (1) it uses a bizarre and ugly form of list iteration to walk buddy lists use standard list functions instead (2) it prints the same information repeatedly once per-node rationalize the braindamaged iteration logic (3) show_free_areas_node() is useless and not called anywhere remove it entirely (4) show_free_areas() itself just calls show_free_areas_core() remove show_free_areas_core() and do the stuff directly (5) SWAP_CACHE_INFO is always #defined, remove it (6) INC_CACHE_INFO() doesn't use the do { } while (0) construct This patch also includes Matthew Dobson's patch which removes mm/numa.c:node_lock. The consensus is that it doesn't do anything now that show_free_areas_node() isn't there. --- include/linux/mm.h | 1 - include/linux/swap.h | 3 --- 2 files changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/mm.h b/include/linux/mm.h index 685868b9e0e4..891b4b5e8e29 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -327,7 +327,6 @@ static inline void set_page_zone(struct page *page, unsigned long zone_num) extern struct page *mem_map; extern void show_free_areas(void); -extern void show_free_areas_node(pg_data_t *pgdat); extern int fail_writepage(struct page *); struct page * shmem_nopage(struct vm_area_struct * vma, unsigned long address, int unused); diff --git a/include/linux/swap.h b/include/linux/swap.h index 8ba0854d69af..c355567500e0 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -176,10 +176,7 @@ int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page); /* linux/mm/page_alloc.c */ /* linux/mm/swap_state.c */ -#define SWAP_CACHE_INFO -#ifdef SWAP_CACHE_INFO extern void show_swap_cache_info(void); -#endif extern int add_to_swap_cache(struct page *, swp_entry_t); extern int add_to_swap(struct page *); extern void __delete_from_swap_cache(struct page *page); -- cgit v1.2.3