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

Re: [PATCH v2 01/13] cpufreq: Allow restricting to internal governors only


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 15 Aug 2022 16:22:46 +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=+U1Y4YOJsAYsYVDpmNjOSUuIUDnkzWOhjYre/EG8rcI=; b=FI3uVRIzKbjxi7A7WglCYsTF4Qh/raiD+FnV2j0XzDAj/K/x2k9vaFYxaGx2Qns19gs5HOskOvmUtzYBs+jaHbyM9L8WtZfPGRyV/0Pq2SYH1j8l8Y8HtibHJoD5F9IzrPcNq9pDccwpUJDDowuABH/PD0NLhDnJMNVVfFsf8YL1jT7bYqwm8oiY4WBr/xik1vq9zpqwzlydVGidJMmhAlBKWg8OzNe6mpD325lYmavN8w8cNFTaXD3yRjRzAoYUp6PuCnHkvkjAWQSVDNbyJg7SvT/eagsFgIyKvH+jvzb5Z8o+YipC7UEkC9cXgXwIg/20q3ZxASMc+AV2ulSGqg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kLhg+ZNRpClE45sdaAObqUj85qfTLpt8Cl6suZ16B7Se60nqN5nKOeSegwJTFaDHEnAUx/qvbe+jl2AqOMIKT0lg67nqCm61olJJvhiYzCQ9n52Ul6lhgRIltgk8mom2cyKPll4qJnZ/zb28RKroRCehzEYLU74MICJwnxElJKU4EETuxZwHFLrzkfFTiQFDsfG+cyTT/HKRmpGyRli5Hc0+rcy4081D59KTE+BkADr6HMNEp/Tj5X2YiJ48YQqq6EScBkRiQ4hxwIxI5BCAPE4B/JfaC2VJjWXqIzbsTLUklDxKB6Ww7Q834rGEQwvnt5XOi3+BITazVAIGLujb2w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 15 Aug 2022 14:23:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.08.2022 21:29, Jason Andryuk wrote:
> For hwp, the standard governors are not usable, and only the internal
> one is applicable.  Add the cpufreq_governor_internal boolean to
> indicate when an internal governor, like hwp-internal, will be used.
> This is set during presmp_initcall, so that it can suppress governor
> registration during initcall.

At which point ...

>  Only a governor with a name containing
> "-internal" will be allowed in that case.
> 
> This way, the unuseable governors are not registered, so they internal
> one is the only one returned to userspace.  This means incompatible
> governors won't be advertised to userspace.
> 
> Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx>
> ---
> v2:
> Switch to "-internal"
> Add blank line in header
> ---
>  xen/drivers/cpufreq/cpufreq.c      | 5 +++++
>  xen/include/acpi/cpufreq/cpufreq.h | 2 ++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c
> index a94520ee57..1fdd63d7b5 100644
> --- a/xen/drivers/cpufreq/cpufreq.c
> +++ b/xen/drivers/cpufreq/cpufreq.c
> @@ -57,6 +57,7 @@ struct cpufreq_dom {
>  };
>  static LIST_HEAD_READ_MOSTLY(cpufreq_dom_list_head);
>  
> +bool __read_mostly cpufreq_governor_internal;

... I expect this can be __initdata? With that adjustment
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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