aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 545c6fccd1dc..deb5ac8c12f3 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3728,8 +3728,13 @@ redo:
3728 } 3728 }
3729 3729
3730 double_unlock_balance(this_rq, busiest); 3730 double_unlock_balance(this_rq, busiest);
3731 /*
3732 * Should not call ttwu while holding a rq->lock
3733 */
3734 spin_unlock(&this_rq->lock);
3731 if (active_balance) 3735 if (active_balance)
3732 wake_up_process(busiest->migration_thread); 3736 wake_up_process(busiest->migration_thread);
3737 spin_lock(&this_rq->lock);
3733 3738
3734 } else 3739 } else
3735 sd->nr_balance_failed = 0; 3740 sd->nr_balance_failed = 0;
@@ -6957,7 +6962,7 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd)
6957 spin_unlock_irqrestore(&rq->lock, flags); 6962 spin_unlock_irqrestore(&rq->lock, flags);
6958} 6963}
6959 6964
6960static int init_rootdomain(struct root_domain *rd, bool bootmem) 6965static int __init_refok init_rootdomain(struct root_domain *rd, bool bootmem)
6961{ 6966{
6962 memset(rd, 0, sizeof(*rd)); 6967 memset(rd, 0, sizeof(*rd));
6963 6968
@@ -6970,7 +6975,7 @@ static int init_rootdomain(struct root_domain *rd, bool bootmem)
6970 } 6975 }
6971 6976
6972 if (!alloc_cpumask_var(&rd->span, GFP_KERNEL)) 6977 if (!alloc_cpumask_var(&rd->span, GFP_KERNEL))
6973 goto free_rd; 6978 goto out;
6974 if (!alloc_cpumask_var(&rd->online, GFP_KERNEL)) 6979 if (!alloc_cpumask_var(&rd->online, GFP_KERNEL))
6975 goto free_span; 6980 goto free_span;
6976 if (!alloc_cpumask_var(&rd->rto_mask, GFP_KERNEL)) 6981 if (!alloc_cpumask_var(&rd->rto_mask, GFP_KERNEL))
@@ -6986,8 +6991,7 @@ free_online:
6986 free_cpumask_var(rd->online); 6991 free_cpumask_var(rd->online);
6987free_span: 6992free_span:
6988 free_cpumask_var(rd->span); 6993 free_cpumask_var(rd->span);
6989free_rd: 6994out:
6990 kfree(rd);
6991 return -ENOMEM; 6995 return -ENOMEM;
6992} 6996}
6993 6997
@@ -7987,7 +7991,7 @@ match2:
7987} 7991}
7988 7992
7989#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) 7993#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
7990int arch_reinit_sched_domains(void) 7994static void arch_reinit_sched_domains(void)
7991{ 7995{
7992 get_online_cpus(); 7996 get_online_cpus();
7993 7997
@@ -7996,13 +8000,10 @@ int arch_reinit_sched_domains(void)
7996 8000
7997 rebuild_sched_domains(); 8001 rebuild_sched_domains();
7998 put_online_cpus(); 8002 put_online_cpus();
7999
8000 return 0;
8001} 8003}
8002 8004
8003static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) 8005static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
8004{ 8006{
8005 int ret;
8006 unsigned int level = 0; 8007 unsigned int level = 0;
8007 8008
8008 if (sscanf(buf, "%u", &level) != 1) 8009 if (sscanf(buf, "%u", &level) != 1)
@@ -8023,9 +8024,9 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
8023 else 8024 else
8024 sched_mc_power_savings = level; 8025 sched_mc_power_savings = level;
8025 8026
8026 ret = arch_reinit_sched_domains(); 8027 arch_reinit_sched_domains();
8027 8028
8028 return ret ? ret : count; 8029 return count;
8029} 8030}
8030 8031
8031#ifdef CONFIG_SCHED_MC 8032#ifdef CONFIG_SCHED_MC
@@ -8060,7 +8061,7 @@ static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644,
8060 sched_smt_power_savings_store); 8061 sched_smt_power_savings_store);
8061#endif 8062#endif
8062 8063
8063int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls) 8064int __init sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
8064{ 8065{
8065 int err = 0; 8066 int err = 0;
8066 8067