mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 23:26:50 +07:00
bde6f5f59c
Aviod TLB flush IPIs during C3 states by voluntary leave_mm() before entering C3. The performance impact of TLB flush on C3 should not be significant with respect to C3 wakeup latency. Also, CPUs tend to flush TLB in hardware while in C3 anyways. On a 8 logical CPU system, running make -j2, the number of tlbflush IPIs goes down from 40 per second to ~ 0. Total number of interrupts during the run of this workload was ~1200 per second, which makes it ~3% savings in wakeups. There was no measurable performance or power impact however. [ akpm@linux-foundation.org: symbol export fixes. ] Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
32 lines
507 B
C
32 lines
507 B
C
#ifndef _ASM_X86_MMU_H
|
|
#define _ASM_X86_MMU_H
|
|
|
|
#include <linux/spinlock.h>
|
|
#include <linux/mutex.h>
|
|
|
|
/*
|
|
* The x86 doesn't have a mmu context, but
|
|
* we put the segment information here.
|
|
*
|
|
* cpu_vm_mask is used to optimize ldt flushing.
|
|
*/
|
|
typedef struct {
|
|
void *ldt;
|
|
#ifdef CONFIG_X86_64
|
|
rwlock_t ldtlock;
|
|
#endif
|
|
int size;
|
|
struct mutex lock;
|
|
void *vdso;
|
|
} mm_context_t;
|
|
|
|
#ifdef CONFIG_SMP
|
|
void leave_mm(int cpu);
|
|
#else
|
|
static inline void leave_mm(int cpu)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* _ASM_X86_MMU_H */
|