From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752926AbbBPPfL (ORCPT ); Mon, 16 Feb 2015 10:35:11 -0500 Received: from smtprelay0129.hostedemail.com ([216.40.44.129]:35223 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752986AbbBPPfJ (ORCPT ); Mon, 16 Feb 2015 10:35:09 -0500 X-Session-Marker: 6E657665747340676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:966:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2553:2559:2562:2693:2911:3138:3139:3140:3141:3142:3151:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4385:4425:5007:6119:6120:6261:7576:7875:7901:7903:9010:10004:10400:10848:10967:11026:11232:11658:11914:12050:12438:12517:12519:12740:13069:13075:13160:13229:13255:13311:13357:13618: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: fifth01_840e80f0f0b2b X-Filterd-Recvd-Size: 2414 Date: Mon, 16 Feb 2015 10:35:06 -0500 From: Steven Rostedt To: Xunlei Pang Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Juri Lelli , Andrew Morton , Dan Streetman , Xunlei Pang Subject: Re: [PATCH v4 2/3] sched/rt: Fix wrong SMP scheduler behavior for equal prio cases Message-ID: <20150216103506.7da87a8a@gandalf.local.home> In-Reply-To: <1424079144-5194-2-git-send-email-xlpang@126.com> References: <1424079144-5194-1-git-send-email-xlpang@126.com> <1424079144-5194-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 Mon, 16 Feb 2015 17:32:23 +0800 Xunlei Pang wrote: > From: Xunlei Pang > > Currently, SMP RT scheduler has some trouble in dealing with > equal prio cases. > > For example, in check_preempt_equal_prio(): > When RT1(current task) gets preempted by RT2, if there is a > migratable RT3 with same prio, RT3 will be pushed away instead > of RT1 afterwards, because RT1 will be enqueued to the tail of > the pushable list when going through succeeding put_prev_task_rt() > triggered by resched. This broke FIFO. > > Furthermore, this is also problematic for normal preempted cases > if there're some rt tasks queued with the same prio as current, > because current will be put behind these tasks in the pushable > queue. > > So, if a task is running and gets preempted by a higher priority > task (or even with same priority for migrating), this patch ensures > that it is put before any existing task with the same priority in > the pushable queue. > > Signed-off-by: Xunlei Pang I'd love to review this now, but unfortunately I need to get ready for my trip to Linux Collab. I'll get back to this next week. Feel free to ping me then. If I have time, I might review this while at the conference, but don't place any bets that I will. -- Steve