[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <73a9c4c3a3d94f06ab90129c4e4a9152@baidu.com>
Date: Wed, 1 Sep 2021 07:19:30 +0000
From: "Li,Rongqing" <lirongqing@...du.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: "mingo@...hat.com" <mingo@...hat.com>,
"juri.lelli@...hat.com" <juri.lelli@...hat.com>,
"vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
"dietmar.eggemann@....com" <dietmar.eggemann@....com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"bsegall@...gle.com" <bsegall@...gle.com>,
"mgorman@...e.de" <mgorman@...e.de>,
"bristot@...hat.com" <bristot@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: 答复: [Resend][PATCH] sched/fair: micro-optimize pick_next_entity()
> -----邮件原件-----
> 发件人: Peter Zijlstra <peterz@...radead.org>
> 发送时间: 2021年8月31日 22:10
> 收件人: Li,Rongqing <lirongqing@...du.com>
> 抄送: mingo@...hat.com; juri.lelli@...hat.com; vincent.guittot@...aro.org;
> dietmar.eggemann@....com; rostedt@...dmis.org; bsegall@...gle.com;
> mgorman@...e.de; bristot@...hat.com; linux-kernel@...r.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?
>
No 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.
True, next/last may be equal to skip
-Li
Powered by blists - more mailing lists