diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-05 13:13:03 -0400 | 
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-05 13:13:03 -0400 | 
| commit | 5e66dd6d66ffe758b39b6dcadf2330753ee1159b (patch) | |
| tree | a72cdcff4448e4af9425cc213ddf56ab23e697fe /mm/page_alloc.c | |
| parent | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (diff) | |
| parent | ca78f6baca863afe2e6a244a0fe94b3a70211d46 (diff) | |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'mm/page_alloc.c')
| -rw-r--r-- | mm/page_alloc.c | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3e792a583f3b..54a4f5375bba 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2005,6 +2005,10 @@ 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) +						/ 100; +#endif  		zone->name = zone_names[j];  		spin_lock_init(&zone->lock);  		spin_lock_init(&zone->lru_lock); @@ -2298,6 +2302,24 @@ int min_free_kbytes_sysctl_handler(ctl_table *table, int write,  	return 0;  } +#ifdef CONFIG_NUMA +int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write, +	struct file *file, void __user *buffer, size_t *length, loff_t *ppos) +{ +	struct zone *zone; +	int rc; + +	rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos); +	if (rc) +		return rc; + +	for_each_zone(zone) +		zone->min_unmapped_ratio = (zone->present_pages * +				sysctl_min_unmapped_ratio) / 100; +	return 0; +} +#endif +  /*   * lowmem_reserve_ratio_sysctl_handler - just a wrapper around   *	proc_dointvec() so that we can call setup_per_zone_lowmem_reserve() | 
