From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752196AbbD3RBv (ORCPT ); Thu, 30 Apr 2015 13:01:51 -0400 Received: from smtprelay0128.hostedemail.com ([216.40.44.128]:36784 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752118AbbD3RBq (ORCPT ); Thu, 30 Apr 2015 13:01:46 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3151:3352:3622:3865:3867:3868:3872:3874:5007:6261:7576:7875:7903:10004:10400:10848:10967:11026:11232:11658:11914:12043:12296:12438:12517:12519:12555:12740:13069:13311:13357:14096:14097:21080,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 X-HE-Tag: alley14_2c4189e6ad658 X-Filterd-Recvd-Size: 2249 Date: Thu, 30 Apr 2015 13:01:43 -0400 From: Steven Rostedt To: Xunlei Pang Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Juri Lelli , Ingo Molnar , Xunlei Pang Subject: Re: [PATCH 2/2] sched/rt: Optimizate task_woken_rt() Message-ID: <20150430130143.46bd8d43@gandalf.local.home> In-Reply-To: <1430411598-4904-2-git-send-email-xlpang@126.com> References: <1430411598-4904-1-git-send-email-xlpang@126.com> <1430411598-4904-2-git-send-email-xlpang@126.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; 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 On Fri, 1 May 2015 00:33:18 +0800 Xunlei Pang wrote: > From: Xunlei Pang > > - Remove "has_pushable_tasks(rq)" condition, because for queued p, > "!task_running(rq, p)" and "p->nr_cpus_allowed > 1" implies true > "has_pushable_tasks(rq)". This makes sense. > > - Remove "!test_tsk_need_resched(rq->curr)" condition, because > the flag might be set right before the waking up, but we still > need to push equal or lower priority tasks, it should be removed. > Without this condition, we actually get the right logic. But doesn't that happen when we schedule? -- Steve > > Signed-off-by: Xunlei Pang > --- > kernel/sched/rt.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c > index a9d33a3..9d735da 100644 > --- a/kernel/sched/rt.c > +++ b/kernel/sched/rt.c > @@ -2233,8 +2233,6 @@ out: > static void task_woken_rt(struct rq *rq, struct task_struct *p) > { > if (!task_running(rq, p) && > - !test_tsk_need_resched(rq->curr) && > - has_pushable_tasks(rq) && > p->nr_cpus_allowed > 1 && > (dl_task(rq->curr) || rt_task(rq->curr)) && > (rq->curr->nr_cpus_allowed < 2 ||