Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347036
b: refs/heads/master
c: 79a4dce
h: refs/heads/master
v: v3
  • Loading branch information
Tang Chen authored and Linus Torvalds committed Dec 18, 2012
1 parent 5d3f54b commit dc8dcf0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: 7179e7bf4592ac5a7b30257a7df6259ee81e51da
refs/heads/master: 79a4dcefd3256896416f5a94d2d1442a7f5aa9b8
18 changes: 12 additions & 6 deletions trunk/mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,18 +590,21 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
}

#ifdef CONFIG_MOVABLE_NODE
/* when CONFIG_MOVABLE_NODE, we allow online node don't have normal memory */
/*
* When CONFIG_MOVABLE_NODE, we permit onlining of a node which doesn't have
* normal memory.
*/
static bool can_online_high_movable(struct zone *zone)
{
return true;
}
#else /* #ifdef CONFIG_MOVABLE_NODE */
#else /* 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 */
#endif /* 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 @@ -1112,12 +1115,15 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
}

#ifdef CONFIG_MOVABLE_NODE
/* when CONFIG_MOVABLE_NODE, we allow online node don't have normal memory */
/*
* When CONFIG_MOVABLE_NODE, we permit offlining of a node which doesn't have
* normal memory.
*/
static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
{
return true;
}
#else /* #ifdef CONFIG_MOVABLE_NODE */
#else /* 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 @@ -1141,7 +1147,7 @@ static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
*/
return present_pages == 0;
}
#endif /* #ifdef CONFIG_MOVABLE_NODE */
#endif /* 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 dc8dcf0

Please sign in to comment.