Re: [PATCH 4/4] sched/fair: Use a recently used CPU as an idle candidate and the basis for SIS
From: Peter Zijlstra
Date: Fri Feb 02 2018 - 09:08:36 EST
On Fri, Feb 02, 2018 at 01:46:47PM +0100, Peter Zijlstra wrote:
> +static void __intel_pstate_hwp_set_desired(int val)
> +{
> + u64 value;
> +
> + value = rdmsrl(MSR_HWP_REQUEST);
> + value &= ~GENMASK_ULL(23, 16);
> + value |= (val & 0xff) << 16;
> + wrmsrl(MSR_HWP_REQUEST, val);
> +}
Also, if we keep a software shadow of that MSR, we can avoid the
rdmsr, which might also help.