From: Wang Jinchao <wangjinchao@xfusion.com>
To: Abel Wu <wuyun.abel@bytedance.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
<linux-kernel@vger.kernel.org>, <stone.xulei@xfusion.com>
Subject: Re: Re: [PATCH] sched/fair: remove next_buddy_marked
Date: Thu, 14 Dec 2023 21:02:17 +0800 [thread overview]
Message-ID: <ZXr82WOsSCIxkuPa@fedora> (raw)
In-Reply-To: <83099016-f609-4ac0-94ab-909ac9c96582@bytedance.com>
On Thu, Dec 14, 2023 at 08:21:53PM +0800, Abel Wu wrote:
> On 12/14/23 4:18 PM, Vincent Guittot Wrote:
> > On Thu, 14 Dec 2023 at 06:20, Wang Jinchao <wangjinchao@xfusion.com> wrote:
> > >
> > > Remove unused `next_buddy_marked` in `check_preempt_wakeup_fair`
> > >
> >
> > Fixes: 5e963f2bd465 ("sched/fair: Commit to EEVDF")
>
> After this commit @pse preempts curr without being the NEXT_BUDDY, but
> IMHO it should be, so how about this?
>
> @@ -8259,8 +8259,11 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
> /*
> * XXX pick_eevdf(cfs_rq) != se ?
> */
> - if (pick_eevdf(cfs_rq) == pse)
> + if (pick_eevdf(cfs_rq) == pse) {
> + if (!next_buddy_marked)
> + set_next_buddy(pse);
> goto preempt;
> + }
>
> return;
>
> which will align with before.
Seizing this opportunity to inquire about a question:
What does "buddy" mean in the context of the scheduler?
Is the effect the same between
preempting after pick_evfd(cfs_rq) == pse
and
preempting after set_next_buddy(pse) followed by pick_evfd(cfs_rq) == pse?
Would both scenarios result in pse becoming the next scheduled se?"
next prev parent reply other threads:[~2023-12-14 13:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 5:20 Wang Jinchao
2023-12-14 8:18 ` Vincent Guittot
2023-12-14 12:21 ` Abel Wu
2023-12-14 13:02 ` Wang Jinchao [this message]
2023-12-14 13:40 ` Abel Wu
2023-12-14 13:41 ` Vincent Guittot
2023-12-23 16:09 ` [tip: sched/core] sched/fair: Remove unused 'next_buddy_marked' local variable in check_preempt_wakeup_fair() tip-bot2 for Wang Jinchao
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=ZXr82WOsSCIxkuPa@fedora \
--to=wangjinchao@xfusion.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=stone.xulei@xfusion.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=wuyun.abel@bytedance.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
all inboxes | Powered by JetHome®