LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Qais Yousef <qais.yousef@arm.com>,
	Valentin Schneider <valentin.schneider@arm.com>
Subject: Re: [PATCH V2] sched: fair: Use the earliest break even
Date: Fri, 13 Mar 2020 14:17:55 +0100	[thread overview]
Message-ID: <c652094b-83bf-1f4c-4b9a-ff911864125f@linaro.org> (raw)
In-Reply-To: <CAKfTPtDUmqYB1i7UcYXxcNjnQOoGufsB9do-9NxTMeWdJAfP2w@mail.gmail.com>

On 13/03/2020 14:15, Vincent Guittot wrote:
> On Fri, 13 Mar 2020 at 13:15, Daniel Lezcano <daniel.lezcano@linaro.org> wrote:

[ ... ]

>>>>>> +
>>>>>> +       if (idle_state)
>>>>>> +               idle_set_break_even(rq, ktime_get_ns() +
>>>>>
>>>>> What worries me a bit is that it adds one ktime_get call each time a
>>>>> cpu enters idle
>>>>
>>>> Right, we can improve this in the future by folding the local_clock() in
>>>> cpuidle when entering idle with this ktime_get.
>>>
>>> Using local_clock() would be more latency friendly
>>
>> Unfortunately we are comparing the deadline across CPUs, so the
>> local_clock() can not be used here.
>>
>> But if we have one ktime_get() instead of a local_clock() + ktime_get(),
>> that should be fine, no?
> 
> Can't this computation of break_even be done in cpuidle framework
> while computing other statistics for selecting the idle state instead
> ? cpuidle already uses ktime_get for next hrtimer as an example.
> So cpuidle compute break_even and make it available to scheduler like
> exit_latency. And I can imagine that system wide time value will also
> be needed when looking at next wakeup event of cluster/group of CPUs

Ok, so you suggest to revisit and consolidate the whole time capture in
cpuidle? I think that makes sense.


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  reply	other threads:[~2020-03-13 13:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 20:26 Daniel Lezcano
2020-03-12  8:36 ` Vincent Guittot
2020-03-12 10:04   ` Daniel Lezcano
2020-03-12 12:27     ` Vincent Guittot
2020-03-13 12:15       ` Daniel Lezcano
2020-03-13 13:15         ` Vincent Guittot
2020-03-13 13:17           ` Daniel Lezcano [this message]
2020-03-13 13:21             ` Vincent Guittot
2020-03-17  7:56     ` Morten Rasmussen
2020-03-17 13:48       ` Daniel Lezcano
2020-03-17 14:30         ` Morten Rasmussen
2020-03-17 17:07           ` Daniel Lezcano
2020-03-18  8:24             ` Morten Rasmussen
2020-03-18 10:17               ` Daniel Lezcano
2020-03-18 14:38                 ` Morten Rasmussen
2020-03-18  7:51           ` Vincent Guittot
2020-03-18  8:33             ` Morten Rasmussen
2020-03-17 10:56 ` Valentin Schneider
2020-03-17 13:59   ` Daniel Lezcano

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=c652094b-83bf-1f4c-4b9a-ff911864125f@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    --subject='Re: [PATCH V2] sched: fair: Use the earliest break even' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).