[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/2] x86/mwait-idle: Customize IceLake server support
From: Chen Yu <yu.c.chen@xxxxxxxxx> On ICX platform, the C1E auto-promotion is enabled by default. As a result, the CPU might fall into C1E more offen than previous platforms. So disable C1E auto-promotion and expose C1E as a separate idle state. Beside C1 and C1E, the exit latency of C6 was measured by a dedicated tool. However the exit latency(41us) exposed by _CST is much smaller than the one we measured(128us). This is probably due to the _CST uses the exit latency when woken up from PC0+C6, rather than PC6+C6 when C6 was measured. Choose the latter as we need the longest latency in theory. Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> [Linux commit a472ad2bcea479ba068880125d7273fc95c14b70] Signed-off-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx> --- Applying this gives almost 100% boost in sysbench cpu test on Whitley SDP --- xen/arch/x86/cpu/mwait-idle.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c index 8add13d..f0c6ff9 100644 --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -554,6 +554,28 @@ static const struct cpuidle_state skx_cstates[] = { {} }; +static const struct cpuidle_state icx_cstates[] = { + { + .name = "C1-ICX", + .flags = MWAIT2flg(0x00), + .exit_latency = 1, + .target_residency = 1, + }, + { + .name = "C1E-ICX", + .flags = MWAIT2flg(0x01), + .exit_latency = 4, + .target_residency = 4, + }, + { + .name = "C6-ICX", + .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency = 128, + .target_residency = 384, + }, + {} +}; + static const struct cpuidle_state atom_cstates[] = { { .name = "C1E-ATM", @@ -904,6 +926,11 @@ static const struct idle_cpu idle_cpu_skx = { .disable_promotion_to_c1e = 1, }; +static const struct idle_cpu idle_cpu_icx = { + .state_table = icx_cstates, + .disable_promotion_to_c1e = 1, +}; + static const struct idle_cpu idle_cpu_avn = { .state_table = avn_cstates, .disable_promotion_to_c1e = 1, @@ -958,6 +985,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconstrel = { ICPU(0x8e, skl), ICPU(0x9e, skl), ICPU(0x55, skx), + ICPU(0x6a, icx), ICPU(0x57, knl), ICPU(0x85, knl), ICPU(0x5c, bxt), -- 2.7.4
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |