From: Viresh Kumar <viresh.kumar@linaro.org>
To: Juri Lelli <Juri.Lelli@arm.com>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-pm@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
joelaf@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: schedutil: Update last_update from sugov_set_iowait_boost()
Date: Tue, 18 Jul 2017 16:55:50 +0530 [thread overview]
Message-ID: <20170718112550.GZ352@vireshk-i7> (raw)
In-Reply-To: <20170718112025.iujrikdrf2sechtp@e106622-lin>
On 18-07-17, 12:20, Juri Lelli wrote:
> Hi Viresh,
>
> On 18/07/17 10:24, Viresh Kumar wrote:
> > sg_cpu->last_update is always updated right after we call
> > sugov_set_iowait_boost() and its better to update it from that routine
> > itself. This makes it more readable.
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> > kernel/sched/cpufreq_schedutil.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> > index 29a397067ffa..63557b9f36b6 100644
> > --- a/kernel/sched/cpufreq_schedutil.c
> > +++ b/kernel/sched/cpufreq_schedutil.c
> > @@ -177,6 +177,8 @@ static void sugov_set_iowait_boost(struct sugov_cpu *sg_cpu, u64 time,
> > if (delta_ns > TICK_NSEC)
> > sg_cpu->iowait_boost = 0;
> > }
> > +
> > + sg_cpu->last_update = time;
> > }
> >
> > static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, unsigned long *util,
> > @@ -219,7 +221,6 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
> > bool busy;
> >
> > sugov_set_iowait_boost(sg_cpu, time, flags);
> > - sg_cpu->last_update = time;
> >
> > if (!sugov_should_update_freq(sg_policy, time))
> > return;
> > @@ -299,7 +300,6 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time,
> > sg_cpu->flags = flags;
> >
> > sugov_set_iowait_boost(sg_cpu, time, flags);
> > - sg_cpu->last_update = time;
>
> It actually belongs here, IMHO. We update other fields (util, max,
> flags)
Yeah, because they have bigger roles and aren't specific to iowait
boost.
> before looking at iowait. Why hiding the time update into a
> function dealing with only one of such fields?
But last_update is very much specific to iowait_boost only and so it
should be updated from sugov_set_iowait_boost() IMHO.
--
viresh
next prev parent reply other threads:[~2017-07-18 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 4:54 Viresh Kumar
2017-07-18 11:20 ` Juri Lelli
2017-07-18 11:25 ` Viresh Kumar [this message]
2017-07-18 11:35 ` Juri Lelli
2017-07-18 22:16 ` Rafael J. Wysocki
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=20170718112550.GZ352@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=Juri.Lelli@arm.com \
--cc=joelaf@google.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=vincent.guittot@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
all inboxes | Powered by JetHome®