aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-14 06:19:19 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-14 06:19:19 -0400
commit873a6ed6288b6c2c0d2cc84d3b2bf2fab9ba0181 (patch)
treee0749eee70ce3ca29d62bb3b67248c87a97ec2b7 /kernel/cpuset.c
parent361833efac4d277d209008e1e0658e597bc1bdef (diff)
parentbce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff)
Merge commit 'v2.6.26' into sched/devel
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 64a05da9bc4..459d601947a 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
1897static void common_cpu_mem_hotplug_unplug(void) 1897static 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)
1924static int cpuset_handle_cpuhp(struct notifier_block *unused_nb, 1925static 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
1942void cpuset_track_online_nodes(void) 1954void 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