Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343333
b: refs/heads/master
c: 09285af
h: refs/heads/master
i:
  343331: ae84633
v: v3
  • Loading branch information
Lai Jiangshan authored and Linus Torvalds committed Dec 13, 2012
1 parent a99ba61 commit 1bb9f0e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20b2f52b73febce476fc9376f0296c1aa0e4f5a7
refs/heads/master: 09285af75d1682d8642607941ca6034ea1b159eb
16 changes: 16 additions & 0 deletions trunk/mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,11 +581,19 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
return 0;
}

#ifdef CONFIG_MOVABLE_NODE
/* when CONFIG_MOVABLE_NODE, we allow online node don't have normal memory */
static bool can_online_high_movable(struct zone *zone)
{
return true;
}
#else /* #ifdef CONFIG_MOVABLE_NODE */
/* ensure every online node has NORMAL memory */
static bool can_online_high_movable(struct zone *zone)
{
return node_state(zone_to_nid(zone), N_NORMAL_MEMORY);
}
#endif /* #ifdef CONFIG_MOVABLE_NODE */

/* check which state of node_states will be changed when online memory */
static void node_states_check_changes_online(unsigned long nr_pages,
Expand Down Expand Up @@ -1093,6 +1101,13 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
return offlined;
}

#ifdef CONFIG_MOVABLE_NODE
/* when CONFIG_MOVABLE_NODE, we allow online node don't have normal memory */
static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
{
return true;
}
#else /* #ifdef CONFIG_MOVABLE_NODE */
/* ensure the node has NORMAL memory if it is still online */
static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
{
Expand All @@ -1116,6 +1131,7 @@ static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
*/
return present_pages == 0;
}
#endif /* #ifdef CONFIG_MOVABLE_NODE */

/* check which state of node_states will be changed when offline memory */
static void node_states_check_changes_offline(unsigned long nr_pages,
Expand Down

0 comments on commit 1bb9f0e

Please sign in to comment.