Lai Jiangshan
d9713679db
memory_hotplug: fix possible incorrect node_states[N_NORMAL_MEMORY]
...
Currently memory_hotplug only manages the node_states[N_HIGH_MEMORY], it
forgets to manage node_states[N_NORMAL_MEMORY]. This may cause
node_states[N_NORMAL_MEMORY] to become incorrect.
Example, if a node is empty before online, and we online a memory which is
in ZONE_NORMAL. And after online, node_states[N_HIGH_MEMORY] is correct,
but node_states[N_NORMAL_MEMORY] is incorrect, the online code doesn't set
the new online node to node_states[N_NORMAL_MEMORY].
The same thing will happen when offlining (the offline code doesn't clear
the node from node_states[N_NORMAL_MEMORY] when needed). Some memory
managment code depends node_states[N_NORMAL_MEMORY], so we have to fix up
the node_states[N_NORMAL_MEMORY].
We add node_states_check_changes_online() and
node_states_check_changes_offline() to detect whether
node_states[N_HIGH_MEMORY] and node_states[N_NORMAL_MEMORY] are changed
while hotpluging.
Also add @status_change_nid_normal to struct memory_notify, thus the
memory hotplug callbacks know whether the node_states[N_NORMAL_MEMORY] are
changed. (We can add a @flags and reuse @status_change_nid instead of
introducing @status_change_nid_normal, but it will add much more
complexity in memory hotplug callback in every subsystem. So introducing
@status_change_nid_normal is better and it doesn't change the sematics of
@status_change_nid)
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com >
Cc: David Rientjes <rientjes@google.com >
Cc: Minchan Kim <minchan.kim@gmail.com >
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com >
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com >
Cc: Rob Landley <rob@landley.net >
Cc: Jiang Liu <jiang.liu@huawei.com >
Cc: Kay Sievers <kay.sievers@vrfy.org >
Cc: Greg Kroah-Hartman <gregkh@suse.de >
Cc: Mel Gorman <mgorman@suse.de >
Cc: Wen Congyang <wency@cn.fujitsu.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2012-12-11 17:22:23 -08:00
..
2012-10-09 15:04:25 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 10:00:29 -03:00
2012-10-09 09:48:44 +01:00
2012-10-11 10:27:51 +09:00
2012-10-19 16:12:38 +01:00
2012-10-17 12:31:15 +01:00
2012-10-29 11:05:12 -07:00
2012-12-11 11:19:09 -08:00
2012-10-09 15:04:25 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-11-21 08:55:26 +01:00
2012-12-11 11:25:08 -08:00
2012-10-09 09:49:02 +01:00
2012-11-21 13:09:56 -08:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-13 14:15:08 -07:00
2012-10-17 12:31:15 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:46 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-11-26 17:41:24 -08:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-12-11 11:25:08 -08:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:51 +09:00
2012-10-10 12:02:25 +09:00
2012-10-12 10:27:27 +09:00
2012-10-13 10:46:48 +01:00
2012-10-12 06:37:36 -05:00
2012-10-19 14:07:47 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-12-11 09:28:09 +01:00
2012-10-24 15:57:14 -07:00
2012-11-28 11:54:40 +01:00
2012-10-13 10:46:48 +01:00
2012-10-16 18:49:15 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-22 11:28:10 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-11-29 17:48:12 -08:00
2012-10-13 10:46:48 +01:00
2012-10-12 00:32:03 -04:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-12-11 17:22:22 -08:00
2012-11-21 10:07:48 +01:00
2012-11-02 12:44:51 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:23:02 +09:00
2012-11-19 22:21:03 +00:00
2012-10-13 10:46:48 +01:00
2012-11-14 11:54:41 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:40 +09:00
2012-10-09 16:22:39 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-12 22:17:48 +09:00
2012-10-13 10:46:48 +01:00
2012-10-17 12:31:15 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-12-11 17:22:22 -08:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-31 20:36:30 -02:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-10 20:14:07 +09:00
2012-10-10 01:15:44 -04:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-24 11:52:21 -07:00
2012-10-11 08:50:16 +09:00
2012-10-09 16:23:02 +09:00
2012-12-11 17:22:23 -08:00
2012-12-06 11:56:43 -08:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:39 +09:00
2012-11-16 14:33:04 -08:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:58 +09:00
2012-11-16 14:33:04 -08:00
2012-10-10 20:00:55 +10:30
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-12-07 14:39:29 -05:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-12-11 17:22:23 -08:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-11-23 22:01:15 +00:00
2012-10-17 15:53:02 -05:00
2012-10-10 22:41:05 -04:00
2012-11-30 10:04:06 +00:00
2012-10-13 10:46:48 +01:00
2012-12-11 17:22:22 -08:00
2012-12-11 17:22:22 -08:00
2012-10-11 08:50:14 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-11-28 07:33:50 -08:00
2012-10-24 10:01:59 +02:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-19 14:07:47 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-11-03 15:27:07 -04:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-25 14:37:52 -07:00
2012-10-09 16:22:40 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-11-16 14:33:04 -08:00
2012-10-09 16:22:43 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-11 20:02:04 -04:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:55 +09:00
2012-10-13 10:46:48 +01:00
2012-10-12 13:35:07 -04:00
2012-10-13 10:46:48 +01:00
2012-10-22 15:16:06 -04:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:32 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-17 11:16:13 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 11:24:47 +01:00
2012-10-09 16:22:59 +09:00
2012-10-09 16:22:59 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-12-11 17:22:21 -08:00
2012-10-13 10:46:48 +01:00