mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 21:31:51 +00:00
cpuset: update top cpuset's mems after adding a node
After adding a node into the machine, top cpuset's mems isn't updated. By reviewing the code, we found that the update function cpuset_track_online_nodes() was invoked after node_states[N_ONLINE] changes. It is wrong because N_ONLINE just means node has pgdat, and if node has/added memory, we use N_HIGH_MEMORY. So, We should invoke the update function after node_states[N_HIGH_MEMORY] changes, just like its commit says. This patch fixes it. And we use notifier of memory hotplug instead of direct calling of cpuset_track_online_nodes(). Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: David Rientjes <rientjes@google.com> Cc: Paul Menage <menage@google.com Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ac97b9f9a2
commit
f481891fdc
3 changed files with 16 additions and 10 deletions
|
@ -74,8 +74,6 @@ static inline int cpuset_do_slab_mem_spread(void)
|
|||
return current->flags & PF_SPREAD_SLAB;
|
||||
}
|
||||
|
||||
extern void cpuset_track_online_nodes(void);
|
||||
|
||||
extern int current_cpuset_is_being_rebound(void);
|
||||
|
||||
extern void rebuild_sched_domains(void);
|
||||
|
@ -151,8 +149,6 @@ static inline int cpuset_do_slab_mem_spread(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void cpuset_track_online_nodes(void) {}
|
||||
|
||||
static inline int current_cpuset_is_being_rebound(void)
|
||||
{
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue