All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jane Malalane <Jane.Malalane@citrix.com>
To: Ian Jackson <iwj@xenproject.org>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] xen/cpufreq: Reset policy after enabling/disabling turbo status
Date: Fri, 12 Nov 2021 11:31:30 +0000	[thread overview]
Message-ID: <c9f80b8d-f411-dd15-fad3-f0a3a740f276@citrix.com> (raw)
In-Reply-To: <24971.45471.990917.651108@mariner.uk.xensource.com>

[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]


On 10/11/2021 11:48, Ian Jackson wrote:

[CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe.

Jane Malalane writes ("[PATCH] xen/cpufreq: Reset policy after enabling/disabling turbo status"):


Before, user would change turbo status but this had no effect: boolean
was set but policy wasn't reevaluated.  Policy must be reevaluated so
that CPU frequency is chosen according to the turbo status and the
current governor.

Therefore, add __cpufreq_governor() in cpufreq_update_turbo().


...


Not taking this patch means that turbo status is misleading.

Taking this patch is low-risk as it only uses a function that already
exists and is already used for setting the chosen scaling governor.
Essentially, this change is equivalent to running 'xenpm
en/disable-turbo-mode' and, subsequently, running 'xenpm
set-scaling-governor <current governor>'.



Thanks.  I am positively inclined.  But I have one query about this
rationale.  Adding a new call to an existing function is OK if calling
__cpufreq_governor is permitted here.  Are there locking or reentrancy
hazards ?  Perhaps these issue have been considered but I would like
to see something explicit about that.

Thanks,


Hi Ian,


I think that's not a concern here because the only other
callers of __cpufreq_governor are __cpufreq_set_policy(), which is under the
same sysctl_lock, and cpufreq_del_cpu, which shouldn't be an issue because no
further action can be performed against the cpu when that function is called.


I will have to submit a v2 of this patch, so I can add
these considerations to the release rationale section?



Thanks,

Jane.



[-- Attachment #2: Type: text/html, Size: 2544 bytes --]

  reply	other threads:[~2021-11-12 11:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  9:19 [PATCH] xen/cpufreq: Reset policy after enabling/disabling turbo status Jane Malalane
2021-11-10 11:48 ` Ian Jackson
2021-11-12 11:31   ` Jane Malalane [this message]
2021-11-10 12:39 ` Roger Pau Monné
2021-11-11 11:06   ` Jan Beulich
2021-11-11 11:00 ` Jan Beulich
2021-11-12 18:51 ` Andrew Cooper
2021-11-12 19:51   ` Jason Andryuk
2021-11-15 10:53   ` Jan Beulich
2021-11-15 14:33     ` Andrew Cooper
2021-11-15 16:21       ` Jan Beulich
2021-11-15 22:05         ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9f80b8d-f411-dd15-fad3-f0a3a740f276@citrix.com \
    --to=jane.malalane@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.