diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-11-07 10:53:06 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-11-07 10:53:06 +0100 |
| commit | b3d9a136815ca9284ade2a897a3b7d2b0084c33c (patch) | |
| tree | af222e53d833ff7218577cf98e1b856d9d6bda93 /drivers/idle/intel_idle.c | |
| parent | x86/mm: Define _PAGE_TABLE using _KERNPG_TABLE (diff) | |
| parent | Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
| download | linux-b3d9a136815ca9284ade2a897a3b7d2b0084c33c.tar.gz linux-b3d9a136815ca9284ade2a897a3b7d2b0084c33c.zip | |
Merge branch 'linus' into x86/asm, to pick up fixes and resolve conflicts
Conflicts:
arch/x86/kernel/cpu/Makefile
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/idle/intel_idle.c')
| -rw-r--r-- | drivers/idle/intel_idle.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 5dc7ea4b6bc4..f0b06b14e782 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -913,15 +913,16 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state = &drv->states[index]; unsigned long eax = flg2MWAIT(state->flags); unsigned int cstate; + int cpu = smp_processor_id(); cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1; /* - * NB: if CPUIDLE_FLAG_TLB_FLUSHED is set, this idle transition - * will probably flush the TLB. It's not guaranteed to flush - * the TLB, though, so it's not clear that we can do anything - * useful with this knowledge. + * leave_mm() to avoid costly and often unnecessary wakeups + * for flushing the user TLB's associated with the active mm. */ + if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED) + leave_mm(cpu); if (!(lapic_timer_reliable_states & (1 << (cstate)))) tick_broadcast_enter(); |
