From: <gregkh@linuxfoundation.org>
To: rafael.j.wysocki@intel.com,christian.loehle@arm.com,stable@vger.kernel.org
Cc: <stable@vger.kernel.org>
Subject: FAILED: patch "[PATCH] cpufreq: Cache post-resolution target frequency in" failed to apply to 5.10-stable tree
Date: Wed, 25 Nov 2026 11:10:28 +0100 [thread overview]
Message-ID: <2026112528-unscrew-recall-9dd7@gregkh> (raw)
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 166207cac45191637c47a457a5c16ca6b6773a16
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026112528-unscrew-recall-9dd7@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 166207cac45191637c47a457a5c16ca6b6773a16 Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Date: Fri, 6 Nov 2026 16:04:05 +0100
Subject: [PATCH] cpufreq: Cache post-resolution target frequency in
__resolve_freq()
get_next_freq() in the schedutil governor returns the resolved
frequency from cpufreq_driver_resolve_freq(), and that resolved value
is then passed to cpufreq_driver_fast_switch(). The only reader of
cached_target_freq, acpi_cpufreq_fast_switch(), compares it with the
post-resolution target frequency, but it holds the pre-resolution
clamped frequency, so any request that falls between table entries
misses the cache and falls back to a table scan.
Address this by making __resolve_freq() store the post-resolution
frequency in cached_target_freq.
Fixes: e3c062360870 ("cpufreq: add cpufreq_driver_resolve_freq()")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Tested-by: Christian Loehle <christian.loehle@arm.com>
Link: https://patch.msgid.link/14161745.uLZWGnKmhe@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index c246e5f7510d..6370d0e71331 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -488,8 +488,8 @@ static unsigned int __resolve_freq(struct cpufreq_policy *policy,
idx = cpufreq_frequency_table_target(policy, target_freq, min, max, relation);
policy->cached_resolved_idx = idx;
- policy->cached_target_freq = target_freq;
- return policy->freq_table[idx].frequency;
+ policy->cached_target_freq = policy->freq_table[idx].frequency;
+ return policy->cached_target_freq;
}
/**
next reply other threads:[~2026-11-25 10:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 10:10 gregkh [this message]
2026-11-25 16:38 ` [PATCH 5.10.y 1/4] docs/zh_CN: add cpu-freq cpu-drivers.rst translation Sasha Levin
2026-11-25 16:38 ` [PATCH 5.10.y 2/4] cpufreq: Reuse cpufreq_driver_resolve_freq() in __cpufreq_driver_target() Sasha Levin
2026-11-25 16:38 ` [PATCH 5.10.y 3/4] cpufreq: Remove ->resolve_freq() Sasha Levin
2026-11-25 16:38 ` [PATCH 5.10.y 4/4] cpufreq: Cache post-resolution target frequency in __resolve_freq() Sasha Levin
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=2026112528-unscrew-recall-9dd7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=christian.loehle@arm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox