[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YS44IzVARx2ZaEUo@hirez.programming.kicks-ass.net>
Date: Tue, 31 Aug 2021 16:09:39 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Li RongQing <lirongqing@...du.com>
Cc: 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
Subject: 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.
Powered by blists - more mailing lists