From: Andrew Morton mm/page_alloc.c: In function `process_zones': mm/page_alloc.c:1898: error: `percpu_pagelist_fraction' undeclared (first use in this function) mm/page_alloc.c:1898: error: (Each undeclared identifier is reported only once mm/page_alloc.c:1898: error: for each function it appears in.) mm/page_alloc.c:1899: warning: implicit declaration of function `setup_pagelist_highmark' mm/page_alloc.c: At top level: mm/page_alloc.c:2607: error: conflicting types for 'setup_pagelist_highmark' mm/page_alloc.c:1899: error: previous implicit declaration of 'setup_pagelist_highmark' was here Cc: Rohit Seth Signed-off-by: Andrew Morton --- mm/page_alloc.c | 36 +++++++++++++++++++----------------- 1 files changed, 19 insertions(+), 17 deletions(-) diff -puN mm/page_alloc.c~make-high-and-batch-sizes-of-per_cpu_pagelists-configurable-fix-fix mm/page_alloc.c --- 25/mm/page_alloc.c~make-high-and-batch-sizes-of-per_cpu_pagelists-configurable-fix-fix 2005-12-11 00:25:50.000000000 -0800 +++ 25-akpm/mm/page_alloc.c 2005-12-11 00:25:50.000000000 -0800 @@ -52,6 +52,7 @@ struct pglist_data *pgdat_list __read_mo unsigned long totalram_pages __read_mostly; unsigned long totalhigh_pages __read_mostly; long nr_swap_pages; +int percpu_pagelist_fraction; static void fastcall free_hot_cold_page(struct page *page, int cold); @@ -1857,6 +1858,24 @@ inline void setup_pageset(struct per_cpu INIT_LIST_HEAD(&pcp->list); } +/* + * setup_pagelist_highmark() sets the high water mark for hot per_cpu_pagelist + * to the value high for the pageset p. + */ + +static void setup_pagelist_highmark(struct per_cpu_pageset *p, + unsigned long high) +{ + struct per_cpu_pages *pcp; + + pcp = &p->pcp[0]; /* hot list */ + pcp->high = high; + pcp->batch = max(1UL, high/4); + if ((high/4) > (PAGE_SHIFT * 8)) + pcp->batch = PAGE_SHIFT * 8; +} + + #ifdef CONFIG_NUMA /* * Boot pageset table. One per cpu which is going to be used for all @@ -2597,23 +2616,6 @@ int lowmem_reserve_ratio_sysctl_handler( return 0; } -int percpu_pagelist_fraction; - -/* setup_pagelist_highmark sets the high water mark for hot per_cpu_pagelist - * to the value high for the pagesrt p. - */ - -static inline void setup_pagelist_highmark(struct per_cpu_pageset *p, unsigned long high) -{ - struct per_cpu_pages *pcp; - - pcp = &p->pcp[0]; /* hot list */ - pcp->high = high; - pcp->batch = max(1UL, high/4); - if ((high/4) > (PAGE_SHIFT * 8)) - pcp->batch = PAGE_SHIFT * 8; -} - /* * percpu_pagelist_fraction - changes the pcp->high for each zone on each * cpu. It is the fraction of total pages in each zone that a hot per cpu pagelist _