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

Re: [PATCH v4 01/15] cpufreq: Allow restricting to internal governors only


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 15 Jun 2023 16:23:32 +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=jLgDniDbZ/fM4TgGEeUzyNPpmQxp8widl1D8rqaW0ow=; b=hEPvfSJBMHuZ+cUVRjg15p8xpO244fg47F35w05eEKCQN3xKrVx3AJlRiJ7GlxEIh/1WRHHtPyXVh88ELC5eqeErkHh3uXJ/nu3Lixj/5m6j9mHkonK89yo5bBwCG7KJ+mMUJfXHOQ/+ZyjPhZYjVo67SCOGIAk/gMWvqqYj44BhyngaOiIZMVOfFZN9hTIZ85dgXRLFLGYzILDtGp8SLqkCkXv7CsgrECPm0SfvUWuu5ufZvOP3ZsF8Lvhx3thQNNFticfETjyqD2ylq6VESj+EDk2bZtcdIyygHIcsfFdwzHHoUMe/vCeHubVGbOO/Lkv9wy+st4NUI+7WIJ0Vhg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K1KlOs1agyi9TepISsnyyNIKxtJN55wjTyTT9k59RIvDw8NOhx/d+c8yekdSNlBahmfyGjDZK5Hdiff7nn8aLe205knbdWH/JLq7fjz40AcEWpszwMwjfnF4CEaD4L1f19IceSUNmpyQ5zh/mDoiqaYAZSk/CViqUkN2683+OkFH+0B4y/1dduzNmByz4HSHZRYhmDcawCR/a78X0SUyyLmq5oKqeqfvP4M7BeSy33sPJhsuhQN3HqE0bnD3xjZ3fpzOprfCiJtuFzsmaNFacp7cp0prIswWHeNN4aHdwwIPptjQlg6+U71SqcbLmNxEi3oDWzhs8oeQph60PDQ9sg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 15 Jun 2023 14:24:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.06.2023 16:04, Jason Andryuk wrote:
> On Thu, Jun 15, 2023 at 9:21 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> Yet then I find this approach a little odd anyway. I think the
>> registration attempts would better be suppressed, thus also not
>> resulting in (apparently) failed init-calls. Especially for the
>> userspace governor this would then also mean / allow to avoid
>> registering of the CPU notifier.
> 
> So are you suggesting that each caller check cpufreq_governor_internal
> and potentially skip calling cpufreq_register_governor()?  e.g. the
> start of cpufreq_gov_userspace_init() would gain:
> 
>     if (cpufreq_governor_internal)
>         return 0
> 
> ?

Right.

> I put the check in cpufreq_register_governor() since then it is
> handled in a single place instead of being spread around.

I understand this was the goal, but I'm still wondering why we would
try registration we know will fail. Plus, as said and even if benign
right now, I'm not happy to see initcall failures being introduced.

> To leave the check in cpufreq_register_governor(),
> cpufreq_gov_userspace_init() could be rearranged to call
> cpufreq_register_governor() first and only call
> register_cpu_notifier() on success?

Might be an option, but would address only part of my concerns.

> Or do you want the whole governor registration to be re-worked to be
> more explicit?  Remove initcalls and have governors registered
> according to the cpufreq driver?

No, I'm not after any extensive re-work.

Jan



 


Rackspace

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