From: Chen Yu <yu.c.chen@intel.com>
To: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Chunxin Zang <spring.cxz@gmail.com>,
Honglei Wang <jameshongleiwang@126.com>, <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>, <juri.lelli@redhat.com>,
<vincent.guittot@linaro.org>, <dietmar.eggemann@arm.com>,
<rostedt@goodmis.org>, <bsegall@google.com>, <mgorman@suse.de>,
<bristot@redhat.com>, <vschneid@redhat.com>,
Mike Galbraith <efault@gmx.de>, <linux-kernel@vger.kernel.org>,
<yangchen11@lixiang.com>, Jerry Zhou <zhouchunhua@lixiang.com>,
Chunxin Zang <zangchunxin@lixiang.com>
Subject: Re: [PATCH v2] sched/fair: Reschedule the cfs_rq when current is ineligible
Date: Fri, 14 Jun 2024 12:14:15 +0800 [thread overview]
Message-ID: <ZmvDl80DQRvtOkoh@chenyu5-mobl2> (raw)
In-Reply-To: <4c285c36-6893-c0c4-1061-0d7e16445e9d@amd.com>
Hi Prateek,
On 2024-06-14 at 08:46:54 +0530, K Prateek Nayak wrote:
> Hello Chenyu,
>
> > > +static bool check_curr_preempt(struct cfs_rq *cfs_rq, struct
> > > sched_entity *curr)
> > > +{
> > > + if (sched_feat(RUN_TO_PARITY) || cfs_rq->nr_running <= 1 ||
> > > + !entity_eligible(cfs_rq, curr))
> >
> > Shouldn't this return false if "entity_eligible(cfs_rq, curr)" returns
> > true since curr is still vruntime eligible on cfs_rq?
> >
> > Would it better to have check_curr_preempt() as follows:
> >
> > if (sched_feat(RUN_TO_PARITY) || cfs_rq->nr_running <= 1)
> > return false;
> >
> > return entity_eligible(cfs_rq, curr);
>
> The above return should have been:
>
> return !entity_eligible(cfs_rq, curr);
>
> Which returns true once curr is not vruntime eligible on cfs_rq.
> Sorry for the oversight.
>
Yes, you are right, thanks for catching this.
thanks,
Chenyu
prev parent reply other threads:[~2024-06-14 4:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 14:18 [PATCH v2] sched/fair: Reschedule the cfs_rq when current is ineligible Chunxin Zang
2024-06-04 7:28 ` kernel test robot
2024-06-07 5:07 ` Chen Yu
2024-06-12 10:39 ` Chunxin Zang
2024-06-13 11:54 ` Chen Yu
2024-06-13 12:02 ` Chunxin Zang
2024-06-13 13:23 ` Chen Yu
2024-06-13 13:46 ` Chunxin Zang
2024-06-14 3:11 ` K Prateek Nayak
2024-06-14 3:16 ` K Prateek Nayak
2024-06-14 4:14 ` Chen Yu [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=ZmvDl80DQRvtOkoh@chenyu5-mobl2 \
--to=yu.c.chen@intel.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=efault@gmx.de \
--cc=jameshongleiwang@126.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=spring.cxz@gmail.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yangchen11@lixiang.com \
--cc=zangchunxin@lixiang.com \
--cc=zhouchunhua@lixiang.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