Linux Power Management development
 help / color / mirror / Atom feed
From: Gaowei Pu <pugaowei@oppo.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: viresh.kumar@linaro.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] cpufreq: queue policy->update work to a dedicated thread
Date: Fri, 18 Jul 2025 15:32:39 +0800	[thread overview]
Message-ID: <a12b4548-dd21-43bb-bc62-18512fb93a6c@oppo.com> (raw)
In-Reply-To: <CAJZ5v0jUqzT_+7VxmRqE_xAWzNCyfiUim-Hz9FaF7G0MuUb=bA@mail.gmail.com>

Hi Rafael J,

On 2025/7/18 2:13, Rafael J. Wysocki wrote:
> On Thu, Jul 17, 2025 at 10:51 AM Gaowei Pu <pugaowei@oppo.com> wrote:
>>
>> We should ensure the low schedule latency of cpu frequency limits work
>> to meet performance and power demands.
> 
> Why is the current arrangement insufficient?
> 
>> so queue the policy->update work to a dedicated thread.
>>
>> Remove the rt setting of the thread in patch v1 at Tim and
>> Rafael J's request. However, it's will not meet everyone's request
>> when we add a dedicated highpri workqueue to do the policy update work.
> 
> Why is it insufficient?

Sorry, mabye i didn't make it clear. There are lots of critical tasks with higher
schedule priority than normal cfs tasks because they are related to drawing in android
systems(e.g., mvp tasks on Qualcomm, vip tasks on Mediatek).

The problem we met is that these critical tasks preempt the kworker doing the 'cpufreq policy->update' work
and delay the cpufreq update work for about 10ms. We can't boost the kworker beacause it's a common worker
thread which also doing other works. Therefore, queue the 'cpufreq policy->update' work to a dedicated thread
and customize the thread is a proper way we can do, not just for convenient.

> 
>> Therefore, we keep the thread and will add a vendor hook in andorid aosp
>> branch lately so we can customize the thread conveniently.
> 
> If you want to do something in the mainline kernel just for the
> convenience of Android AOSP, with all due respect thereof, don't do
> it.

Okay, Should i try to pick this patch to Android AOSP branch? thanks.

> 
> This is not going to be considered for 6.17, so you may as well come
> back with it when 6.17-rc1 is out.
> 
> Thanks!

  reply	other threads:[~2025-07-18  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17  8:51 [PATCH v2] cpufreq: queue policy->update work to a dedicated thread Gaowei Pu
2025-07-17 16:25 ` Markus Elfring
2025-07-17 18:13 ` Rafael J. Wysocki
2025-07-18  7:32   ` Gaowei Pu [this message]
2025-07-18  1:57 ` kernel test robot

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=a12b4548-dd21-43bb-bc62-18512fb93a6c@oppo.com \
    --to=pugaowei@oppo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=viresh.kumar@linaro.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