From: Qais Yousef <qais.yousef@arm.com>
To: Tao Zhou <t1zhou@aliyun.com>
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Pavan Kondeti <pkondeti@codeaurora.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
linux-kernel@vger.kernel.org, t1zhou@163.com
Subject: Re: [PATCH v3 4/6] sched/rt: Allow pulling unfitting task
Date: Wed, 4 Mar 2020 15:28:20 +0000 [thread overview]
Message-ID: <20200304152820.t6kkxvpgoa6444ta@e107158-lin.cambridge.arm.com> (raw)
In-Reply-To: <20200304145219.GA14173@geo.homenetwork>
On 03/04/20 22:52, Tao Zhou wrote:
> Hi Qais,
>
> On Mon, Mar 02, 2020 at 01:27:19PM +0000, Qais Yousef wrote:
> > When implemented RT Capacity Awareness; the logic was done such that if
> > a task was running on a fitting CPU, then it was sticky and we would try
> > our best to keep it there.
> >
> > But as Steve suggested, to adhere to the strict priority rules of RT
> > class; allow pulling an RT task to unfitting CPU to ensure it gets a
> > chance to run ASAP.
> >
> > Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> > Fixes: 804d402fb6f6 ("sched/rt: Make RT capacity-aware")
> > LINK: https://lore.kernel.org/lkml/20200203111451.0d1da58f@oasis.local.home/
> > Signed-off-by: Qais Yousef <qais.yousef@arm.com>
> > ---
> > kernel/sched/rt.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> > index 3071c8612c03..e79a23ad4a93 100644
> > --- a/kernel/sched/rt.c
> > +++ b/kernel/sched/rt.c
> > @@ -1656,8 +1656,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
> > static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
> > {
> > if (!task_running(rq, p) &&
> > - cpumask_test_cpu(cpu, p->cpus_ptr) &&
> > - rt_task_fits_capacity(p, cpu))
> > + cpumask_test_cpu(cpu, p->cpus_ptr))
> > return 1;
> >
> > return 0;
> > --
> > 2.17.1
> >
>
> How about using a rt_cap_overloaded(like rt_overloaded) to indicate the
> cpu is overloaded because a RT task is on unfit CPU. And use stop_one_cpu
> to do in this case.
We have explored a variation of this (without using the stop_one_cpu) in v2
https://lore.kernel.org/lkml/20200223184001.14248-6-qais.yousef@arm.com/
I might still consider this in the future. But I think I need to do better
analysis of the cost-benefit here before pushing further for that.
I'm not keen on stopping a running task as well, not yet at least.
>
> IIRC, HAVE_RT_PUSH_IPI do not select the specific cpu to do the
> push because the complex there. When RT cap join in, i don't know it
> is need to select the specific unfit CPU or rt overloaded CPU in what
> order is a choice.
I'm not sure I understood you completely here.
I think the patch above dealt with the complexity I think you're talking about.
Thanks
--
Qais Yousef
next prev parent reply other threads:[~2020-03-04 15:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 13:27 [PATCH v3 0/6] RT Capacity Awareness Fixes & Improvements Qais Yousef
2020-03-02 13:27 ` [PATCH v3 1/6] sched/rt: cpupri_find: Implement fallback mechanism for !fit case Qais Yousef
[not found] ` <20200304143200.GA13200@geo.homenetwork>
2020-03-04 15:18 ` Qais Yousef
2020-03-04 16:27 ` Steven Rostedt
2020-03-04 17:39 ` Qais Yousef
2020-03-04 18:54 ` Steven Rostedt
2020-03-04 20:01 ` Qais Yousef
2020-03-05 12:43 ` Qais Yousef
2020-03-10 14:22 ` Qais Yousef
2020-03-11 13:51 ` Steven Rostedt
2020-03-20 12:58 ` [tip: sched/core] sched/rt: cpupri_find: Trigger a full search as fallback tip-bot2 for Qais Yousef
2020-03-06 14:42 ` [tip: sched/core] sched/rt: cpupri_find: Implement fallback mechanism for !fit case tip-bot2 for Qais Yousef
2020-03-02 13:27 ` [PATCH v3 2/6] sched/rt: Re-instate old behavior in select_task_rq_rt Qais Yousef
2020-03-06 14:42 ` [tip: sched/core] sched/rt: Re-instate old behavior in select_task_rq_rt() tip-bot2 for Qais Yousef
2020-03-02 13:27 ` [PATCH v3 3/6] sched/rt: Optimize cpupri_find on non-heterogenous systems Qais Yousef
2020-03-06 14:42 ` [tip: sched/core] sched/rt: Optimize cpupri_find() " tip-bot2 for Qais Yousef
2020-03-02 13:27 ` [PATCH v3 4/6] sched/rt: Allow pulling unfitting task Qais Yousef
[not found] ` <20200304145219.GA14173@geo.homenetwork>
2020-03-04 15:28 ` Qais Yousef [this message]
2020-03-06 14:42 ` [tip: sched/core] " tip-bot2 for Qais Yousef
2020-03-02 13:27 ` [PATCH v3 5/6] sched/rt: Remove unnecessary push for unfit tasks Qais Yousef
2020-03-06 14:42 ` [tip: sched/core] " tip-bot2 for Qais Yousef
2020-03-02 13:27 ` [PATCH v3 6/6] sched/rt: Fix pushing unfit tasks to a better CPU Qais Yousef
2020-03-06 17:51 ` Qais Yousef
2020-03-11 10:53 ` Pavan Kondeti
2020-03-11 14:11 ` Qais Yousef
2020-03-11 14:00 ` Steven Rostedt
2020-03-11 14:23 ` Qais Yousef
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=20200304152820.t6kkxvpgoa6444ta@e107158-lin.cambridge.arm.com \
--to=qais.yousef@arm.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@kernel.org \
--cc=peterz@infradead.org \
--cc=pkondeti@codeaurora.org \
--cc=rostedt@goodmis.org \
--cc=t1zhou@163.com \
--cc=t1zhou@aliyun.com \
--cc=vincent.guittot@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).