aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-03 17:00:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-03 17:00:15 -0400
commitc84a1e32ee58fc1cc9d3fd42619b917cce67e30a (patch)
treed3e5bed273f747e7c9e399864219bea76f4c30ea /arch/powerpc/kernel
parent3d521f9151dacab566904d1f57dcb3e7080cdd8f (diff)
parent096aa33863a5e48de52d2ff30e0801b7487944f4 (diff)
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next
Pull scheduler updates from Ingo Molnar: "The main scheduling related changes in this cycle were: - various sched/numa updates, for better performance - tree wide cleanup of open coded nice levels - nohz fix related to rq->nr_running use - cpuidle changes and continued consolidation to improve the kernel/sched/idle.c high level idle scheduling logic. As part of this effort I pulled cpuidle driver changes from Rafael as well. - standardized idle polling amongst architectures - continued work on preparing better power/energy aware scheduling - sched/rt updates - misc fixlets and cleanups" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (49 commits) sched/numa: Decay ->wakee_flips instead of zeroing sched/numa: Update migrate_improves/degrades_locality() sched/numa: Allow task switch if load imbalance improves sched/rt: Fix 'struct sched_dl_entity' and dl_task_time() comments, to match the current upstream code sched: Consolidate open coded implementations of nice level frobbing into nice_to_rlimit() and rlimit_to_nice() sched: Initialize rq->age_stamp on processor start sched, nohz: Change rq->nr_running to always use wrappers sched: Fix the rq->next_balance logic in rebalance_domains() and idle_balance() sched: Use clamp() and clamp_val() to make sys_nice() more readable sched: Do not zero sg->cpumask and sg->sgp->power in build_sched_groups() sched/numa: Fix initialization of sched_domain_topology for NUMA sched: Call select_idle_sibling() when not affine_sd sched: Simplify return logic in sched_read_attr() sched: Simplify return logic in sched_copy_attr() sched: Fix exec_start/task_hot on migrated tasks arm64: Remove TIF_POLLING_NRFLAG metag: Remove TIF_POLLING_NRFLAG sched/idle: Make cpuidle_idle_call() void sched/idle: Reflow cpuidle_idle_call() sched/idle: Delay clearing the polling bit ...
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/smp.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index e2a4232c5871..10ffffef0414 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -766,6 +766,28 @@ int setup_profiling_timer(unsigned int multiplier)
766 return 0; 766 return 0;
767} 767}
768 768
769#ifdef CONFIG_SCHED_SMT
770/* cpumask of CPUs with asymetric SMT dependancy */
771static const int powerpc_smt_flags(void)
772{
773 int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
774
775 if (cpu_has_feature(CPU_FTR_ASYM_SMT)) {
776 printk_once(KERN_INFO "Enabling Asymmetric SMT scheduling\n");
777 flags |= SD_ASYM_PACKING;
778 }
779 return flags;
780}
781#endif
782
783static struct sched_domain_topology_level powerpc_topology[] = {
784#ifdef CONFIG_SCHED_SMT
785 { cpu_smt_mask, powerpc_smt_flags, SD_INIT_NAME(SMT) },
786#endif
787 { cpu_cpu_mask, SD_INIT_NAME(DIE) },
788 { NULL, },
789};
790
769void __init smp_cpus_done(unsigned int max_cpus) 791void __init smp_cpus_done(unsigned int max_cpus)
770{ 792{
771 cpumask_var_t old_mask; 793 cpumask_var_t old_mask;
@@ -790,15 +812,8 @@ void __init smp_cpus_done(unsigned int max_cpus)
790 812
791 dump_numa_cpu_topology(); 813 dump_numa_cpu_topology();
792 814
793} 815 set_sched_topology(powerpc_topology);
794 816
795int arch_sd_sibling_asym_packing(void)
796{
797 if (cpu_has_feature(CPU_FTR_ASYM_SMT)) {
798 printk_once(KERN_INFO "Enabling Asymmetric SMT scheduling\n");
799 return SD_ASYM_PACKING;
800 }
801 return 0;
802} 817}
803 818
804#ifdef CONFIG_HOTPLUG_CPU 819#ifdef CONFIG_HOTPLUG_CPU