linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
	"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
	"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
	"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"bsegall@google.com" <bsegall@google.com>,
	"mgorman@suse.de" <mgorman@suse.de>,
	"bristot@redhat.com" <bristot@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 答复: [Resend][PATCH] sched/fair: micro-optimize pick_next_entity()
Date: Fri, 3 Sep 2021 03:59:08 +0000	[thread overview]
Message-ID: <ccbb34c46fe74d11a93c8514f0ba9936@baidu.com> (raw)
In-Reply-To: <YS44IzVARx2ZaEUo@hirez.programming.kicks-ass.net>



> -----邮件原件-----
> 发件人: Peter Zijlstra <peterz@infradead.org>
> 发送时间: 2021年8月31日 22:10
> 收件人: Li,Rongqing <lirongqing@baidu.com>
> 抄送: mingo@redhat.com; juri.lelli@redhat.com; vincent.guittot@linaro.org;
> dietmar.eggemann@arm.com; rostedt@goodmis.org; bsegall@google.com;
> mgorman@suse.de; bristot@redhat.com; linux-kernel@vger.kernel.org
> 主题: Re: [Resend][PATCH] sched/fair: micro-optimize pick_next_entity()
> 
> On Wed, Aug 25, 2021 at 02:27:49PM +0800, Li RongQing wrote:
> > Only check the skip buddy when next buddy and last buddy are not
> > picked up, this can save the cycles of checking the skip buddy and
> > computation of the second buddy, when next and last buddy will be
> > picked up for example, yield_to_task_fair() set both next and skip
> > buddy
> 
> Is that actually measurable?
> 
> But looking at it, should we not, instead, move the whole ->skip thing to the
> bottom, so we unconditionally check it vs the result of
> ->next/->last ?
> 
> Imagine ->next == ->skip, then we want to avoid running it and not have
> ->next win.

skip means this task is running on cpu, next is the blocked task and will be running.

I donot know how they can be same.

-Li

      parent reply	other threads:[~2021-09-03  3:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  6:27 [Resend][PATCH] sched/fair: micro-optimize pick_next_entity() Li RongQing
2021-08-31 14:09 ` Peter Zijlstra
2021-09-01  7:19   ` 答复: " Li,Rongqing
2021-09-03  3:59   ` Li,Rongqing [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=ccbb34c46fe74d11a93c8514f0ba9936@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.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=rostedt@goodmis.org \
    --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;
as well as URLs for NNTP newsgroup(s).