LKML Archive on
help / color / mirror / Atom feed
From: Peter Zijlstra <>
To: Li RongQing <>
Subject: Re: [Resend][PATCH] sched/fair: micro-optimize pick_next_entity()
Date: Tue, 31 Aug 2021 16:09:39 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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.

  reply	other threads:[~2021-08-31 14:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  6:27 Li RongQing
2021-08-31 14:09 ` Peter Zijlstra [this message]
2021-09-01  7:19   ` 答复: " Li,Rongqing
2021-09-03  3:59   ` Li,Rongqing

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [Resend][PATCH] sched/fair: micro-optimize pick_next_entity()' \

* 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).