linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xuewen Yan <xuewen.yan94@gmail.com>
To: Pierre Gondois <pierre.gondois@arm.com>
Cc: Dietmar Eggemann <Dietmar.Eggemann@arm.com>,
	Quentin Perret <qperret@google.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Benjamin Segall <bsegall@google.com>,
	Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Ryan Y <xuewyan@foxmail.com>
Subject: Re: [PATCH] sched/fair: use signed long when compute energy delta in eas
Date: Tue, 13 Apr 2021 19:59:26 +0800	[thread overview]
Message-ID: <CAB8ipk-qe0sWQ97afgaZ_kg5675TBafUgOT4tkf4NT-yvhSh2Q@mail.gmail.com> (raw)
In-Reply-To: <d017749a-697e-9cda-4940-df4cdbdd3a55@arm.com>

Hi
> > >
> > > In fair.c:select_task_rq_fair(), if feec() returns a error (< 0), then
> > > prev_cpu is selected. I think it's better to still let feec() signal
> > > that something happened and let select_task_rq_fair() select prev_cpu by
> > > itself.
> > In fair.c:select_task_rq_fair(), when feec() returns a error (< 0),
> > the new_cpu = find_idlest_cpu() or select_idle_sibling().
> > In your patch, you should return prev_cpu instead of -1 if you want to
> > select the prev_cpu.
> Having a negative delta doesn't imply that prev_cpu is still available.
> E.g.: If prev_cpu cannot receive the task (and is skipped), and a
> negative delta appears when evaluating the other CPUs. In such case
> feec() cannot select prev_cpu. dst_cpu must be selected by another function.
In this case, would it be better to add a condition "prev_delta == ULONG_MAX" ?
Returnig(-1)  could avoid the negative delta, but I still think this
is not the fundamental way to solve the problem.
But I think you can send a V2 with the bail out mechanism.

Regards

      reply	other threads:[~2021-04-13 12:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  5:21 [PATCH] sched/fair: use signed long when compute energy delta in eas Xuewen Yan
2021-03-30  9:45 ` Quentin Perret
2021-04-01 18:07   ` Dietmar Eggemann
2021-04-06 10:59     ` Xuewen Yan
2021-04-07 14:11       ` Pierre
2021-04-08  5:41         ` Xuewen Yan
2021-04-08  9:33           ` Pierre
2021-04-09  2:20             ` Xuewen Yan
2021-04-12 10:26               ` Pierre Gondois
2021-04-12 10:52                 ` Xuewen Yan
2021-04-12 17:14                   ` Pierre Gondois
2021-04-13  1:50                     ` Xuewen Yan
2021-04-13 10:58                       ` Pierre Gondois
2021-04-13 11:59                         ` Xuewen Yan [this message]

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=CAB8ipk-qe0sWQ97afgaZ_kg5675TBafUgOT4tkf4NT-yvhSh2Q@mail.gmail.com \
    --to=xuewen.yan94@gmail.com \
    --cc=Dietmar.Eggemann@arm.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pierre.gondois@arm.com \
    --cc=qperret@google.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=xuewyan@foxmail.com \
    --cc=zhang.lyra@gmail.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 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).