Commit 79a4dcefd3256896416f5a94d2d1442a7f5aa9b8
Committed by
Linus Torvalds
1 parent
7179e7bf45
Exists in
master
and in
20 other branches
mm/memory_hotplug.c: improve comments
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Cc: Jiang Liu <jiang.liu@huawei.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 12 additions and 6 deletions Side-by-side Diff
mm/memory_hotplug.c
... | ... | @@ -590,18 +590,21 @@ |
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, |
608 | 611 | |
... | ... | @@ -1112,12 +1115,15 @@ |
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 @@ |
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, |