[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: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 18 Jan 2022 15:05:54 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=CY01eDPIdNUgaM0W0u+a4b0Y9vXWduh1ER7pUfvEAiY=; b=FGJTYvMYPXCRYrzYWKyOCljeZtDdA3ntX4SkGPRn8EH1iWcoTTNBl+tQGqufAaqjROLy05SmeqwSKfPWfbwPqDzalr2V0rP0FUnZusHKpArkGzgB0ycZcdkPgU96DwkXGq5iAfpIJKyIpUIpTeNZrx4EiGtdyD3wDFnsEj0Usp8yklsfKWj064VKLEOkXc6mCj3ETGne5SPJaPFufawmO4TXi0n1i5z7iy1TK0YSz7VR+TbaUFl58LZtgwNXtyKDSkebIprf0A0QUO5nuxBtH2dJgGSAGsAb8Zo0/pZeWU9pb1bL2psVR0ut5dYBPUJfvbIxZ1c3umKW7m4rswRXzw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FrPQXFfLqrypWDZ08cKKocjkDrrtpmyAgPus/86QHHnXB2rq0BjoL2ccN0xu+RhJocJxBlu1FP2m91WnMOO/Jd61aHfwBzfu0scj2ZoYW1aNav3XDn9+rUPTvSHiKVY282JaoVRQLGAy+EiXsDAc1Ivy+Gm0lfismw8TJC9I8EPnRY4KduuZ5zXoKnRS7rI0vbm52+JGcFl6hoLrpLRwLSp+4EN005/5VUF58v96xzjcJXYwxdUIIk492DAT4dJVmdAk9i2I4p/6cOTKnsur/vTqo8ZOR80LFISBkVxRFnJt8/ISf+w7r+cna4gr1pHT2EJ5AqdzDUX9zPmnGwc9fA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 18 Jan 2022 14:06:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.01.2022 11:17, Roger Pau Monné wrote:
> On Mon, Sep 06, 2021 at 03:00:46PM +0200, Jan Beulich wrote:
>> --- 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?

I don't know. We're simply following the Linux side change. If we're
unhappy with their naming (it indeed looks inconsistent), then we
ought to make a separate patch on top (and maybe submit that also to
Linux).

>> @@ -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.

bool_t is just an alias of bool, so "true" ought to be fine. We may
want to follow Linux in switching to bool altogether - iirc we didn't
have bool yet at the time the driver (or the first commit needing it)
was ported. I guess I'll make a patch ...

Jan




 


Rackspace

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