[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 07/14 RESEND] cpufreq: Export HWP parameters to userspace
- To: Jason Andryuk <jandryuk@xxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 8 May 2023 12:46:57 +0200
- 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=3Kbj56+TveSb8xyuNr5L5tBwkr4DcPGmlHwHBe74nP4=; b=cnOIc0qBpjpZIFPj6f662s+MUfLUHzpcK7jFVdQReAUfn5VSkP7vQe1TC2xRPbo4gUTNMhivfYMKDjsDvsybD2jTilRlY+ITdRFViIq9mzsIV4OROgML4IujaRaLC55VFv4Ot1FgX3VMyEf8Wmirk9ZsILFKE5Km8Q5KJEaVmZvhgaI5YoJpZQ/4Pr09QrXWolTtz5zoM/aoc0BNpaLiU27HzSLpRKALTrrsR9EvZsr1N4XZcG7I3LMB194zDltJnsBcSTb+GUoVJXNV3KMGnnCy/i6osyOAYCjeZd38GPiPoLO4089aFvZazA66uRjW2cRB+gMIpoMP0U8Kap0YRA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mLIr+16dX+1jZG6XvZ6yCRWHYMvDnuDI9QrOyhWtgBN0G2thX8qdXVs8UHipgXAOzD01vhtn0lyOg0922CmobgnFKFj6/gkn0EIOA2M+2VoJnVpQ4IeW7lus7ewwfBczEC2+PyB4zPNLgInA3ilzAgK5TNEEJGbVYI2QJBTwzazJrLeqsDhLJmAg6kzFO2gzn7KkN6g+KqpcHQ1mqVG/FSgOXo1WXYOArZg6W1kw6gf49eob2Rf1chxkitYnFKbW3vD6Ph+r+NZpU3Z42b7x5CGb7qZ/YxQfX9UJFoVVumOqIzFL4i5PQoR0ghsTyfyJqYtKXyC6ZjZTkjarzuLExQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 08 May 2023 10:47:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 08.05.2023 12:25, Jan Beulich wrote:
> On 01.05.2023 21:30, Jason Andryuk wrote:
>> Extend xen_get_cpufreq_para to return hwp parameters. These match the
>> hardware rather closely.
>>
>> We need the features bitmask to indicated fields supported by the actual
>> hardware.
>>
>> The use of uint8_t parameters matches the hardware size. uint32_t
>> entries grows the sysctl_t past the build assertion in setup.c. The
>> uint8_t ranges are supported across multiple generations, so hopefully
>> they won't change.
>
> Still it feels a little odd for values to be this narrow. Aiui the
> scaling_governor[] and scaling_{max,min}_freq fields aren't (really)
> used by HWP. So you could widen the union in struct
> xen_get_cpufreq_para (in a binary but not necessarily source compatible
> manner), gaining you 6 more uint32_t slots. Possibly the somewhat oddly
> placed scaling_cur_freq could be included as well ...
Having seen patch 9 now as well, I wonder whether here (or in a separate
patch) you don't want to limit providing inapplicable data (for example
not filling *scaling_available_governors would even avoid an allocation,
thus removing a possible reason for failure), while there (or again in a
separate patch) you'd also limit what the tool reports (inapplicable
output causes confusion / questions at best).
Jan
|