[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.14] x86/mwait-idle: customize IceLake server support



commit d2ba323eaae06416728267344b55d345d1bd3b9b
Author:     Chen Yu <yu.c.chen@xxxxxxxxx>
AuthorDate: Tue Oct 20 14:44:59 2020 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Oct 20 14:44:59 2020 +0200

    x86/mwait-idle: customize IceLake server support
    
    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>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    master commit: 44ac57af81ff8097e228895738b911ca819bda19
    master date: 2020-10-15 12:29:11 +0200
---
 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 52eab81bf8..015bf83887 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",
@@ -907,6 +929,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,
@@ -961,6 +988,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),
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.14



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.