diff options
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r-- | kernel/cpuset.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 64a05da9bc4c..459d601947a8 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -1894,7 +1894,7 @@ static void scan_for_empty_cpusets(const struct cpuset *root) | |||
1894 | * in order to minimize text size. | 1894 | * in order to minimize text size. |
1895 | */ | 1895 | */ |
1896 | 1896 | ||
1897 | static void common_cpu_mem_hotplug_unplug(void) | 1897 | static void common_cpu_mem_hotplug_unplug(int rebuild_sd) |
1898 | { | 1898 | { |
1899 | cgroup_lock(); | 1899 | cgroup_lock(); |
1900 | 1900 | ||
@@ -1906,7 +1906,8 @@ static void common_cpu_mem_hotplug_unplug(void) | |||
1906 | * Scheduler destroys domains on hotplug events. | 1906 | * Scheduler destroys domains on hotplug events. |
1907 | * Rebuild them based on the current settings. | 1907 | * Rebuild them based on the current settings. |
1908 | */ | 1908 | */ |
1909 | rebuild_sched_domains(); | 1909 | if (rebuild_sd) |
1910 | rebuild_sched_domains(); | ||
1910 | 1911 | ||
1911 | cgroup_unlock(); | 1912 | cgroup_unlock(); |
1912 | } | 1913 | } |
@@ -1924,11 +1925,22 @@ static void common_cpu_mem_hotplug_unplug(void) | |||
1924 | static int cpuset_handle_cpuhp(struct notifier_block *unused_nb, | 1925 | static int cpuset_handle_cpuhp(struct notifier_block *unused_nb, |
1925 | unsigned long phase, void *unused_cpu) | 1926 | unsigned long phase, void *unused_cpu) |
1926 | { | 1927 | { |
1927 | if (phase == CPU_DYING || phase == CPU_DYING_FROZEN) | 1928 | switch (phase) { |
1929 | case CPU_UP_CANCELED: | ||
1930 | case CPU_UP_CANCELED_FROZEN: | ||
1931 | case CPU_DOWN_FAILED: | ||
1932 | case CPU_DOWN_FAILED_FROZEN: | ||
1933 | case CPU_ONLINE: | ||
1934 | case CPU_ONLINE_FROZEN: | ||
1935 | case CPU_DEAD: | ||
1936 | case CPU_DEAD_FROZEN: | ||
1937 | common_cpu_mem_hotplug_unplug(1); | ||
1938 | break; | ||
1939 | default: | ||
1928 | return NOTIFY_DONE; | 1940 | return NOTIFY_DONE; |
1941 | } | ||
1929 | 1942 | ||
1930 | common_cpu_mem_hotplug_unplug(); | 1943 | return NOTIFY_OK; |
1931 | return 0; | ||
1932 | } | 1944 | } |
1933 | 1945 | ||
1934 | #ifdef CONFIG_MEMORY_HOTPLUG | 1946 | #ifdef CONFIG_MEMORY_HOTPLUG |
@@ -1941,7 +1953,7 @@ static int cpuset_handle_cpuhp(struct notifier_block *unused_nb, | |||
1941 | 1953 | ||
1942 | void cpuset_track_online_nodes(void) | 1954 | void cpuset_track_online_nodes(void) |
1943 | { | 1955 | { |
1944 | common_cpu_mem_hotplug_unplug(); | 1956 | common_cpu_mem_hotplug_unplug(0); |
1945 | } | 1957 | } |
1946 | #endif | 1958 | #endif |
1947 | 1959 | ||