forked from Minki/linux
- Exclude AVX opmask registers use from AVX512 state tracking as they
don't contribute to frequency throttling -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmHcAjYACgkQEsHwGGHe VUqgkw//RixgjMiu/YH50mqrpYCtk6WPtecssMeVMth4ATWD/JoDzyh+r4ZqfYXI owSQ3tZA+bByXT7TRhI8XONYQhj1+45UvG6bI6LNJN0CVzw64g7MkHsh0f1tfjft Tt2SsKDWYQibMmHLZ01aLi7/ibTevkdKeEIvtbJSTW/qyjXYKKzpcFDBQeoPcP8R qfUwfLm/YbWR0wCoeaR2WCGwgXwV+6rUk+mHMK0sxws8/jrtz+OQWnTHsmvUg1Re pJqRSQvwkeXU+j2JMOntz//66Cw00fOrbe1sQ6VWf0+VbHGKdhXXiWjMBXj+Ye8d 53CSsQzkIeNwD505W+Yx+Ju2irxk2H2NgCN7HXokohYYLy8rGpy5jK8AinCHWflU 3HD9ee1nF9laiyDZczu8yL6tD5gWWuHJRgDr3jm5juOPaYVEAbZMEc747JOPpi8V 4HBlQSzXh179vNEEBBiTOuJN7t9PkJD7SHfW9sHo6tQ7wyd42qDCw0gGGAqh+upp 1p+2IoGM9r2fL8aAWlV2HALf0E+ugywIfmb2O5HpKgk+3z+fb/DwaZ6T7posM+gr r6JwXNOCUFcyJzVeTokmRzWO079qHyxmL+pWF1S5y7mHiVHoCpjM1olDsCkDdsKI Sp4iZ70soqDSOq4EO6twVyyrt0GsoshNd/p9GHWA2rRQKyJFRhs= =aPgM -----END PGP SIGNATURE----- Merge tag 'x86_fpu_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu update from Borislav Petkov: "A single x86/fpu update for 5.17: - Exclude AVX opmask registers use from AVX512 state tracking as they don't contribute to frequency throttling" * tag 'x86_fpu_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Correct AVX512 state tracking
This commit is contained in:
commit
191cf7fab9
@ -98,6 +98,19 @@ bool irq_fpu_usable(void)
|
||||
}
|
||||
EXPORT_SYMBOL(irq_fpu_usable);
|
||||
|
||||
/*
|
||||
* Track AVX512 state use because it is known to slow the max clock
|
||||
* speed of the core.
|
||||
*/
|
||||
static void update_avx_timestamp(struct fpu *fpu)
|
||||
{
|
||||
|
||||
#define AVX512_TRACKING_MASK (XFEATURE_MASK_ZMM_Hi256 | XFEATURE_MASK_Hi16_ZMM)
|
||||
|
||||
if (fpu->fpstate->regs.xsave.header.xfeatures & AVX512_TRACKING_MASK)
|
||||
fpu->avx512_timestamp = jiffies;
|
||||
}
|
||||
|
||||
/*
|
||||
* Save the FPU register state in fpu->fpstate->regs. The register state is
|
||||
* preserved.
|
||||
@ -116,13 +129,7 @@ void save_fpregs_to_fpstate(struct fpu *fpu)
|
||||
{
|
||||
if (likely(use_xsave())) {
|
||||
os_xsave(fpu->fpstate);
|
||||
|
||||
/*
|
||||
* AVX512 state is tracked here because its use is
|
||||
* known to slow the max clock speed of the core.
|
||||
*/
|
||||
if (fpu->fpstate->regs.xsave.header.xfeatures & XFEATURE_MASK_AVX512)
|
||||
fpu->avx512_timestamp = jiffies;
|
||||
update_avx_timestamp(fpu);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user