Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758329AbcC2Wr0 (ORCPT ); Tue, 29 Mar 2016 18:47:26 -0400 Received: from smtprelay0040.hostedemail.com ([216.40.44.40]:51840 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756693AbcC2WrZ (ORCPT ); Tue, 29 Mar 2016 18:47:25 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::,RULES_HIT:41:355:379:541:599:800:960:967:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2560:2563:2682:2685:2693:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:5007:6119:6120:6261:7875:7901:7903:8660:9025:10004:10400:10848:10967:11026:11232:11658:11914:12043:12296:12485:12517:12519:12555:12663:12740:13148:13230:13255:13439:14096:14097:14181:14659:14721:21080:21324:30054:30080:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: roof70_5d9c33ce2ca59 X-Filterd-Recvd-Size: 3195 Date: Tue, 29 Mar 2016 18:47:22 -0400 From: Steven Rostedt To: Juri Lelli Cc: Wanpeng Li , Ingo Molnar , Peter Zijlstra , Kirill V Tkhai , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3] sched/deadline: do not try to push tasks if pinned task switches to dl Message-ID: <20160329184722.0d54b946@gandalf.local.home> In-Reply-To: <544779D1.4060309@arm.com> References: <1413938203-224610-1-git-send-email-wanpeng.li@linux.intel.com> <544779D1.4060309@arm.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2111 Lines: 56 On Wed, 22 Oct 2014 10:33:05 +0100 Juri Lelli wrote: > On 22/10/14 01:36, Wanpeng Li wrote: > > As Kirill mentioned(https://lkml.org/lkml/2013/1/29/118): > > | If rq has already had 2 or more pushable tasks and we try to add a > > | pinned task then call of push_rt_task will just waste a time. > > > > Just switched pinned task is not able to be pushed. If the rq has had > > several dl tasks before they have already been considered as candidates > > to be pushed (or pulled). This patch implements the same behavior as rt > > class which introduced by commit 10447917551e ("sched/rt: Do not try to > > push tasks if pinned task switches to RT"). > > > > Signed-off-by: Wanpeng Li > > --- > > v2 -> v3: > > * cleanup patch description > > * align && to p->nr_cpus_allowed > > v1 -> v2: > > * use 12 or more chars for the git commit ID > > > > kernel/sched/deadline.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > > index abfaf3d..bd5e479 100644 > > --- a/kernel/sched/deadline.c > > +++ b/kernel/sched/deadline.c > > @@ -1603,7 +1603,8 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p) > > > > if (task_on_rq_queued(p) && rq->curr != p) { > > #ifdef CONFIG_SMP > > - if (rq->dl.overloaded && push_dl_task(rq) && rq != task_rq(p)) > > + if (p->nr_cpus_allowed > 1 && rq->dl.overloaded && > > + push_dl_task(rq) && rq != task_rq(p)) > > /* Only reschedule if pushing failed */ > > check_resched = 0; > > #endif /* CONFIG_SMP */ > > > I'm looking at some old changes for sched-deadline, and I stumbled across this. As I'm working on sched deadline tests, I've discovered that they can't have cpu affinity. They are limited to their sched domains. That is, sched deadline tasks have whatever affinity that the domain they happen to be in has. Is there a condition where rq != task_rq(p) and p->nr_cpus_allowed > 1 isn't true? Now maybe this will help with -rt when a task hits a migrate disable? Just asking. -- Steve