提交 8417bba4 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

[PATCH] Replace min_unmapped_ratio by min_unmapped_pages in struct zone

*_pages is a better description of the role of the variable.
Signed-off-by: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 d00bcc98
......@@ -169,7 +169,7 @@ struct zone {
/*
* zone reclaim becomes active if more unmapped pages exist.
*/
unsigned long min_unmapped_ratio;
unsigned long min_unmapped_pages;
struct per_cpu_pageset *pageset[NR_CPUS];
#else
struct per_cpu_pageset pageset[NR_CPUS];
......
......@@ -2002,7 +2002,7 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat,
zone->spanned_pages = size;
zone->present_pages = realsize;
#ifdef CONFIG_NUMA
zone->min_unmapped_ratio = (realsize*sysctl_min_unmapped_ratio)
zone->min_unmapped_pages = (realsize*sysctl_min_unmapped_ratio)
/ 100;
#endif
zone->name = zone_names[j];
......@@ -2313,7 +2313,7 @@ int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write,
return rc;
for_each_zone(zone)
zone->min_unmapped_ratio = (zone->present_pages *
zone->min_unmapped_pages = (zone->present_pages *
sysctl_min_unmapped_ratio) / 100;
return 0;
}
......
......@@ -1618,7 +1618,7 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
* unmapped file backed pages.
*/
if (zone_page_state(zone, NR_FILE_PAGES) -
zone_page_state(zone, NR_FILE_MAPPED) <= zone->min_unmapped_ratio)
zone_page_state(zone, NR_FILE_MAPPED) <= zone->min_unmapped_pages)
return 0;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册