@@ -590,18 +590,21 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
590
590
}
591
591
592
592
#ifdef CONFIG_MOVABLE_NODE
593
- /* when CONFIG_MOVABLE_NODE, we allow online node don't have normal memory */
593
+ /*
594
+ * When CONFIG_MOVABLE_NODE, we permit onlining of a node which doesn't have
595
+ * normal memory.
596
+ */
594
597
static bool can_online_high_movable (struct zone * zone )
595
598
{
596
599
return true;
597
600
}
598
- #else /* #ifdef CONFIG_MOVABLE_NODE */
601
+ #else /* CONFIG_MOVABLE_NODE */
599
602
/* ensure every online node has NORMAL memory */
600
603
static bool can_online_high_movable (struct zone * zone )
601
604
{
602
605
return node_state (zone_to_nid (zone ), N_NORMAL_MEMORY );
603
606
}
604
- #endif /* #ifdef CONFIG_MOVABLE_NODE */
607
+ #endif /* CONFIG_MOVABLE_NODE */
605
608
606
609
/* check which state of node_states will be changed when online memory */
607
610
static void node_states_check_changes_online (unsigned long nr_pages ,
@@ -1112,12 +1115,15 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
1112
1115
}
1113
1116
1114
1117
#ifdef CONFIG_MOVABLE_NODE
1115
- /* when CONFIG_MOVABLE_NODE, we allow online node don't have normal memory */
1118
+ /*
1119
+ * When CONFIG_MOVABLE_NODE, we permit offlining of a node which doesn't have
1120
+ * normal memory.
1121
+ */
1116
1122
static bool can_offline_normal (struct zone * zone , unsigned long nr_pages )
1117
1123
{
1118
1124
return true;
1119
1125
}
1120
- #else /* #ifdef CONFIG_MOVABLE_NODE */
1126
+ #else /* CONFIG_MOVABLE_NODE */
1121
1127
/* ensure the node has NORMAL memory if it is still online */
1122
1128
static bool can_offline_normal (struct zone * zone , unsigned long nr_pages )
1123
1129
{
@@ -1141,7 +1147,7 @@ static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
1141
1147
*/
1142
1148
return present_pages == 0 ;
1143
1149
}
1144
- #endif /* #ifdef CONFIG_MOVABLE_NODE */
1150
+ #endif /* CONFIG_MOVABLE_NODE */
1145
1151
1146
1152
/* check which state of node_states will be changed when offline memory */
1147
1153
static void node_states_check_changes_offline (unsigned long nr_pages ,
0 commit comments