Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250874
b: refs/heads/master
c: 1b79acc
h: refs/heads/master
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed May 25, 2011
1 parent ea4bf0e commit dbe7b26
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 839a4fcc8af7412be2efd11f0bd0504757f79f08
refs/heads/master: 1b79acc91115ba47e744b70bb166b77bd94f5855
2 changes: 1 addition & 1 deletion trunk/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ extern void set_dma_reserve(unsigned long new_dma_reserve);
extern void memmap_init_zone(unsigned long, int, unsigned long,
unsigned long, enum memmap_context);
extern void setup_per_zone_wmarks(void);
extern void calculate_zone_inactive_ratio(struct zone *zone);
extern int __meminit init_per_zone_wmark_min(void);
extern void mem_init(void);
extern void __init mmap_init(void);
extern void show_mem(unsigned int flags);
Expand Down
9 changes: 5 additions & 4 deletions trunk/mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,9 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages)
zone_pcp_update(zone);

mutex_unlock(&zonelists_mutex);
setup_per_zone_wmarks();
calculate_zone_inactive_ratio(zone);

init_per_zone_wmark_min();

if (onlined_pages) {
kswapd_run(zone_to_nid(zone));
node_set_state(zone_to_nid(zone), N_HIGH_MEMORY);
Expand Down Expand Up @@ -893,8 +894,8 @@ static int __ref offline_pages(unsigned long start_pfn,
zone->zone_pgdat->node_present_pages -= offlined_pages;
totalram_pages -= offlined_pages;

setup_per_zone_wmarks();
calculate_zone_inactive_ratio(zone);
init_per_zone_wmark_min();

if (!node_present_pages(node)) {
node_clear_state(node, N_HIGH_MEMORY);
kswapd_stop(node);
Expand Down
4 changes: 2 additions & 2 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5094,7 +5094,7 @@ void setup_per_zone_wmarks(void)
* 1TB 101 10GB
* 10TB 320 32GB
*/
void __meminit calculate_zone_inactive_ratio(struct zone *zone)
static void __meminit calculate_zone_inactive_ratio(struct zone *zone)
{
unsigned int gb, ratio;

Expand Down Expand Up @@ -5140,7 +5140,7 @@ static void __meminit setup_per_zone_inactive_ratio(void)
* 8192MB: 11584k
* 16384MB: 16384k
*/
static int __init init_per_zone_wmark_min(void)
int __meminit init_per_zone_wmark_min(void)
{
unsigned long lowmem_kbytes;

Expand Down

0 comments on commit dbe7b26

Please sign in to comment.