diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-04 11:36:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-04 11:36:35 -0400 |
commit | 5e0b3a4e88012d259e8b2c0f02f393c79686daf9 (patch) | |
tree | 1c6d7be145a7cce77996049eb78877ed95e87a4f /arch | |
parent | 0d99b7087324978b09b59d8c7a0736214c4a42b1 (diff) | |
parent | 10866e62e8a6907d9072f10f9a0561db0c0cf50b (diff) |
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler changes from Ingo Molnar:
"Various optimizations, cleanups and smaller fixes - no major changes
in scheduler behavior"
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/fair: Fix the sd_parent_degenerate() code
sched/fair: Rework and comment the group_imb code
sched/fair: Optimize find_busiest_queue()
sched/fair: Make group power more consistent
sched/fair: Remove duplicate load_per_task computations
sched/fair: Shrink sg_lb_stats and play memset games
sched: Clean-up struct sd_lb_stat
sched: Factor out code to should_we_balance()
sched: Remove one division operation in find_busiest_queue()
sched/cputime: Use this_cpu_add() in task_group_account_field()
cpumask: Fix cpumask leak in partition_sched_domains()
sched/x86: Optimize switch_mm() for multi-threaded workloads
generic-ipi: Kill unnecessary variable - csd_flags
numa: Mark __node_set() as __always_inline
sched/fair: Cleanup: remove duplicate variable declaration
sched/__wake_up_sync_key(): Fix nr_exclusive tasks which lead to WF_SYNC clearing
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/mmu_context.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index cdbf36776106..be12c534fd59 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h | |||
@@ -45,22 +45,28 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
45 | /* Re-load page tables */ | 45 | /* Re-load page tables */ |
46 | load_cr3(next->pgd); | 46 | load_cr3(next->pgd); |
47 | 47 | ||
48 | /* stop flush ipis for the previous mm */ | 48 | /* Stop flush ipis for the previous mm */ |
49 | cpumask_clear_cpu(cpu, mm_cpumask(prev)); | 49 | cpumask_clear_cpu(cpu, mm_cpumask(prev)); |
50 | 50 | ||
51 | /* | 51 | /* Load the LDT, if the LDT is different: */ |
52 | * load the LDT, if the LDT is different: | ||
53 | */ | ||
54 | if (unlikely(prev->context.ldt != next->context.ldt)) | 52 | if (unlikely(prev->context.ldt != next->context.ldt)) |
55 | load_LDT_nolock(&next->context); | 53 | load_LDT_nolock(&next->context); |
56 | } | 54 | } |
57 | #ifdef CONFIG_SMP | 55 | #ifdef CONFIG_SMP |
58 | else { | 56 | else { |
59 | this_cpu_write(cpu_tlbstate.state, TLBSTATE_OK); | 57 | this_cpu_write(cpu_tlbstate.state, TLBSTATE_OK); |
60 | BUG_ON(this_cpu_read(cpu_tlbstate.active_mm) != next); | 58 | BUG_ON(this_cpu_read(cpu_tlbstate.active_mm) != next); |
61 | 59 | ||
62 | if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next))) { | 60 | if (!cpumask_test_cpu(cpu, mm_cpumask(next))) { |
63 | /* We were in lazy tlb mode and leave_mm disabled | 61 | /* |
62 | * On established mms, the mm_cpumask is only changed | ||
63 | * from irq context, from ptep_clear_flush() while in | ||
64 | * lazy tlb mode, and here. Irqs are blocked during | ||
65 | * schedule, protecting us from simultaneous changes. | ||
66 | */ | ||
67 | cpumask_set_cpu(cpu, mm_cpumask(next)); | ||
68 | /* | ||
69 | * We were in lazy tlb mode and leave_mm disabled | ||
64 | * tlb flush IPI delivery. We must reload CR3 | 70 | * tlb flush IPI delivery. We must reload CR3 |
65 | * to make sure to use no freed page tables. | 71 | * to make sure to use no freed page tables. |
66 | */ | 72 | */ |