[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] x86/mwait-idle: add SnowRidge C-state table
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 18 Jan 2022 11:17:15 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qw3wDa9wMxqYSpvwIpNB9KZvGJXGKQSUl51dLxhgRAM=; b=A4WmA40eQcHBdJqxyP1DhESSmWvUHdoyh6VmL5GU3p3Dudog8c9jUFMR5D6m5XPufTjndRb5Wh8wiApySfzdyRgG0VugRAqZ5GREPvqnhnqIPFKJDm/pXSJl7zEvxvQgM88z5X1kS3W8buNrwgxJVazakWv92A97IN12iR14vjRQq6uwM4KM9K1ZvZEBZbLIWoM8Plhnrk6/ymVxb/uZLVjxWyR7jPWgrBKOTzICh2l3h5Ad8dIm7BPRnF5EWrCvePccAHZQARHBfNVtEuNWzMLcNlGbMWNYJuzB8voqlODgrLJgl4UYs1FiCckKKMfagr8V8kZGzFBzmJjKV6N9jw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZRiTqo7371f/gz0A5jNYLf9ZMBwKlel/gATTrr1JPR8U12FIZ0jbmRzk+mF5h3rCsPGUagJ437DlxHXFoKk46ZivBfBsIE3F+J1yHsh8AS2PmXhPJSkHAoWbKdcSGPnkVQgZb7LGKZgpVwLSyFTQ8JoQXima3bMyWJROvtJ6IGvBiQi0Ts4Ck5D85TCv4QYDNpjcM9bVFhEuCGADZK+H6HQVyxJ82JAEkwIfdORWjIGsUOZ71Sh1P0vh/9vQxwZjmdF+a2AKVuQ3TWJH7IbBhTmT3o8iNKIy6/JluRVlKl83lAewO32YncDf21aI8tH1X+t6q9ZDN76y06y0uM6Xhg==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 18 Jan 2022 10:17:47 +0000
- Ironport-data: A9a23:wyTAl6kXm2akHGSM/6Iy9jfo5gxgIURdPkR7XQ2eYbSJt1+Wr1Gzt xJJUGqFPPmKZ2qmcttwPdy08U1V7MPUz9UyS1c/pCFhESMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BClVlxJVF/fngqoDUUYYoAQgsA180IMsdoUg7wbRh29c42YHR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 PVmh6yzFzooBe7doehCSDVSVD9TAKITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBNPsM44F/Glp0BnSDOo8QICFSKLPjTNd9Glq3JgWRKeBD yYfQT5ETUTnaDxzAXZJVI5im/j1hyP9KgQN/Tp5ooJoujOOnWSdyoPFL979atGMA8JPkS6wt m/Aumj0HBweHNie0iaetGKhgPfVmiH2U55UE6e3ntZoilCOwm0YCDUNSEC25/K+jyaDt8l3c hJOvHB09O5rqRLtHoKVswCETGCsnjUua9kOLuwBqxC0xvXPzwzeGEU5QWsUADA5j/MeSTsv3 16PutrmAz1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ebPjYaGAFHeHC8AHP7xiFqvCnXtdz0wsQBYaqNecmVoDPGUwDlDmD+/2s1bB/p3+cQa DwFnWtl+bXVp/SagXAG+qxJjdJH6uuYRlTzDse1pDsIDl3shy+3K8qCIsGQZP+W5GWZWHyBiT7 ZKuYHsjzRG+r3FfqUmuFigGrfhuqXWVdjOtVWs0j/FEa6pi4g8k1dsun67nr5QXO4Es/qjRs59 11OgJouQ7+qN0W/IqA6m7bUlP1hdGK7fY+WubVxq0+rd7aqeK8u2qr+DUUDfTIqufbnEeGq2hT C4YhMOS2ZPIBKUtjxotDwQa5
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Sep 06, 2021 at 03:00:46PM +0200, Jan Beulich wrote:
> From: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>
>
> Add C-state table for the SnowRidge SoC which is found on Intel Jacobsville
> platforms.
>
> The following has been changed.
>
> 1. C1E latency changed from 10us to 15us. It was measured using the
> open source "wult" tool (the "nic" method, 15us is the 99.99th
> percentile).
>
> 2. C1E power break even changed from 20us to 25us, which may result
> in less C1E residency in some workloads.
>
> 3. C6 latency changed from 50us to 130us. Measured the same way as C1E.
>
> The C6 C-state is supported only by some SnowRidge revisions, so add a C-state
> table commentary about this.
>
> On SnowRidge, C6 support is enumerated via the usual mechanism: "mwait" leaf
> of
> the "cpuid" instruction. The 'intel_idle' driver does check this leaf, so even
> though C6 is present in the table, the driver will only use it if the CPU does
> support it.
>
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> [Linux commit: 9cf93f056f783f986c19f40d5304d1bcffa0fc0d]
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> --- a/xen/arch/x86/cpu/mwait-idle.c
> +++ b/xen/arch/x86/cpu/mwait-idle.c
> @@ -742,6 +742,32 @@ static const struct cpuidle_state dnv_cs
> {}
> };
>
> +/*
> + * Note, depending on HW and FW revision, SnowRidge SoC may or may not
> support
> + * C6, and this is indicated in the CPUID mwait leaf.
> + */
> +static const struct cpuidle_state snr_cstates[] = {
> + {
> + .name = "C1",
We usually use names like "C1-SNR" or similar in other cpuidle_state
structs. Is using plain "C1" intentional here?
> + .flags = MWAIT2flg(0x00),
> + .exit_latency = 2,
> + .target_residency = 2,
> + },
> + {
> + .name = "C1E",
> + .flags = MWAIT2flg(0x01),
> + .exit_latency = 15,
> + .target_residency = 25,
> + },
> + {
> + .name = "C6",
> + .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED,
> + .exit_latency = 130,
> + .target_residency = 500,
> + },
> + {}
> +};
> +
> static void mwait_idle(void)
> {
> unsigned int cpu = smp_processor_id();
> @@ -954,6 +980,11 @@ static const struct idle_cpu idle_cpu_dn
> .disable_promotion_to_c1e = 1,
> };
>
> +static const struct idle_cpu idle_cpu_snr = {
> + .state_table = snr_cstates,
> + .disable_promotion_to_c1e = true,
This likely wants to be 1 because the type is bool_t.
Thanks, Roger.
|