All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: rjw@rjwysocki.net, mingo@redhat.com, peterz@infradead.org,
	juri.lelli@redhat.com, vincent.guittot@linaro.org,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	bsegall@google.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, huyue2@yulong.com,
	zbestahu@163.com
Subject: Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set
Date: Fri, 19 Feb 2021 16:20:26 +0800	[thread overview]
Message-ID: <20210219162026.00002e2b.zbestahu@gmail.com> (raw)
In-Reply-To: <20210219074249.2hcwcnakihor343h@vireshk-i7>

On Fri, 19 Feb 2021 13:12:49 +0530
Viresh Kumar <viresh.kumar@linaro.org> wrote:

> On 19-02-21, 14:41, Yue Hu wrote:
> > On Fri, 19 Feb 2021 09:39:33 +0530
> > Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >   
> > > On 19-02-21, 11:38, Yue Hu wrote:  
> > > > There's a possibility: we will use the previous freq to update
> > > > if next_f is reduced for busy CPU if need_freq_update is set in
> > > > sugov_update_next_freq().    
> > > 
> > > Right.
> > >   
> > > > This possibility would happen now? And this
> > > > update is what we want if it happens?    
> > > 
> > > This is exactly what we want here, don't reduce speed for busy
> > > CPU,  
> > 
> > I understand it should not skip this update but set the same freq as
> > previous one again for the special case if need_freq_update is set.
> > Am i rt?  
> 
> The special check, about not reducing freq if CPU had been busy
> recently, doesn't have anything to do with need_freq_update.

However, we will skip the update if need_freq_update is not set. And do
the update if need_freq_update is set.

Note that there are unnecessary fast switch check and spin lock/unlock
operations in freq skip path.

If we consider unnecessary behaviors above, then we should return right
away rather than continue to execute following code.

Consequently, we also need to consider need_update_freq flag since we
need to update freq currently if it is set.

> 
> Though previously we added the need_freq_update check there to make
> sure we account for any recent policy min/max change and don't skip
> freq update anymore. That won't happen anymore and so we don't need
> any check here related to need_freq_update.
> 
> If you still have doubt, please explain your concern in detail with an
> example as I am failing to understand it.
> 


  reply	other threads:[~2021-02-19  8:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210218082514.1437-1-zbestahu@gmail.com>
2021-02-18 10:20 ` [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set Viresh Kumar
2021-02-19  3:38   ` Yue Hu
2021-02-19  4:09     ` Viresh Kumar
2021-02-19  6:41       ` Yue Hu
2021-02-19  7:42         ` Viresh Kumar
2021-02-19  8:20           ` Yue Hu [this message]
2021-02-19  9:35             ` Viresh Kumar
2021-02-19 11:45               ` Yue Hu
2021-02-22  5:30                 ` Viresh Kumar
2021-02-22  9:04                   ` Yue Hu
2021-02-22 14:30                     ` Rafael J. Wysocki
2021-02-24  2:24                       ` Yue Hu
2021-02-24 12:46                         ` Rafael J. Wysocki
2021-02-25  1:38                           ` Yue Hu

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=20210219162026.00002e2b.zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=huyue2@yulong.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=zbestahu@163.com \
    /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.