From: Andrew Morton Remove the last bits of Martin's ill-fated sys_set_zone_reclaim(). Cc: Martin Hicks Signed-off-by: Andrew Morton --- include/asm-i386/unistd.h | 2 - include/asm-ia64/unistd.h | 2 - include/linux/swap.h | 1 mm/vmscan.c | 73 ---------------------------------------------- 4 files changed, 2 insertions(+), 76 deletions(-) diff -puN include/linux/swap.h~kill-last-zone_reclaim-bits include/linux/swap.h --- devel/include/linux/swap.h~kill-last-zone_reclaim-bits 2005-12-22 05:08:49.000000000 -0800 +++ devel-akpm/include/linux/swap.h 2005-12-22 05:08:49.000000000 -0800 @@ -172,7 +172,6 @@ extern void swap_setup(void); /* linux/mm/vmscan.c */ extern int try_to_free_pages(struct zone **, gfp_t); -extern int zone_reclaim(struct zone *, gfp_t, unsigned int); extern int shrink_all_memory(int); extern int vm_swappiness; diff -puN include/asm-i386/unistd.h~kill-last-zone_reclaim-bits include/asm-i386/unistd.h --- devel/include/asm-i386/unistd.h~kill-last-zone_reclaim-bits 2005-12-22 05:08:49.000000000 -0800 +++ devel-akpm/include/asm-i386/unistd.h 2005-12-22 05:08:49.000000000 -0800 @@ -256,7 +256,7 @@ #define __NR_io_submit 248 #define __NR_io_cancel 249 #define __NR_fadvise64 250 -#define __NR_set_zone_reclaim 251 +/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ #define __NR_exit_group 252 #define __NR_lookup_dcookie 253 #define __NR_epoll_create 254 diff -puN include/asm-ia64/unistd.h~kill-last-zone_reclaim-bits include/asm-ia64/unistd.h --- devel/include/asm-ia64/unistd.h~kill-last-zone_reclaim-bits 2005-12-22 05:08:49.000000000 -0800 +++ devel-akpm/include/asm-ia64/unistd.h 2005-12-22 05:08:49.000000000 -0800 @@ -265,7 +265,7 @@ #define __NR_keyctl 1273 #define __NR_ioprio_set 1274 #define __NR_ioprio_get 1275 -#define __NR_set_zone_reclaim 1276 +/* 1276 is available for reuse (was briefly sys_set_zone_reclaim) */ #define __NR_inotify_init 1277 #define __NR_inotify_add_watch 1278 #define __NR_inotify_rm_watch 1279 diff -puN mm/vmscan.c~kill-last-zone_reclaim-bits mm/vmscan.c --- devel/mm/vmscan.c~kill-last-zone_reclaim-bits 2005-12-22 05:08:49.000000000 -0800 +++ devel-akpm/mm/vmscan.c 2005-12-22 05:08:49.000000000 -0800 @@ -1353,76 +1353,3 @@ static int __init kswapd_init(void) } module_init(kswapd_init) - - -/* - * Try to free up some pages from this zone through reclaim. - */ -int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) -{ - struct scan_control sc; - int nr_pages = 1 << order; - int total_reclaimed = 0; - - /* The reclaim may sleep, so don't do it if sleep isn't allowed */ - if (!(gfp_mask & __GFP_WAIT)) - return 0; - if (zone->all_unreclaimable) - return 0; - - sc.gfp_mask = gfp_mask; - sc.may_writepage = 0; - sc.may_swap = 0; - sc.nr_mapped = read_page_state(nr_mapped); - sc.nr_scanned = 0; - sc.nr_reclaimed = 0; - /* scan at the highest priority */ - sc.priority = 0; - disable_swap_token(); - - if (nr_pages > SWAP_CLUSTER_MAX) - sc.swap_cluster_max = nr_pages; - else - sc.swap_cluster_max = SWAP_CLUSTER_MAX; - - /* Don't reclaim the zone if there are other reclaimers active */ - if (atomic_read(&zone->reclaim_in_progress) > 0) - goto out; - - shrink_zone(zone, &sc); - total_reclaimed = sc.nr_reclaimed; - - out: - return total_reclaimed; -} - -asmlinkage long sys_set_zone_reclaim(unsigned int node, unsigned int zone, - unsigned int state) -{ - struct zone *z; - int i; - - if (!capable(CAP_SYS_ADMIN)) - return -EACCES; - - if (node >= MAX_NUMNODES || !node_online(node)) - return -EINVAL; - - /* This will break if we ever add more zones */ - if (!(zone & (1<node_zones[i]; - - if (state) - z->reclaim_pages = 1; - else - z->reclaim_pages = 0; - } - - return 0; -} _