From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757833AbbEaAPz (ORCPT ); Sat, 30 May 2015 20:15:55 -0400 Received: from blu004-omc1s10.hotmail.com ([65.55.116.21]:56172 "EHLO BLU004-OMC1S10.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754733AbbEaAPs (ORCPT ); Sat, 30 May 2015 20:15:48 -0400 X-TMN: [wNXHuV4yKnoLBUxPSsi0H0f6tQdjEjui] X-Originating-Email: [wanpeng.li@hotmail.com] Message-ID: Date: Sun, 31 May 2015 08:15:39 +0800 From: Wanpeng Li User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Peter Zijlstra , Wanpeng Li CC: Ingo Molnar , Juri Lelli , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 7/7] sched/rt: reschedule if stop/dl task slip in after pull operations References: <1431496867-4194-1-git-send-email-wanpeng.li@linux.intel.com> <1431496867-4194-7-git-send-email-wanpeng.li@linux.intel.com> <20150529143420.GR3644@twins.programming.kicks-ass.net> In-Reply-To: <20150529143420.GR3644@twins.programming.kicks-ass.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 31 May 2015 00:15:46.0236 (UTC) FILETIME=[F0B027C0:01D09B36] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/29/15 10:34 PM, Peter Zijlstra wrote: > On Wed, May 13, 2015 at 02:01:07PM +0800, Wanpeng Li wrote: >> pull_rt_task() can drop (and re-acquire) rq->lock, this means a dl >> or stop task can slip in, in which case need to reschedule. This >> patch add the reschedule when the scenario occurs. >> >> Signed-off-by: Wanpeng Li >> --- >> kernel/sched/rt.c | 19 ++++++++++++++++++- >> 1 file changed, 18 insertions(+), 1 deletion(-) >> >> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c >> index 560d2fa..8c948bf 100644 >> --- a/kernel/sched/rt.c >> +++ b/kernel/sched/rt.c >> @@ -2136,7 +2136,14 @@ static void switched_from_rt(struct rq *rq, struct task_struct *p) >> if (!task_on_rq_queued(p) || rq->rt.rt_nr_running) >> return; >> >> - if (pull_rt_task(rq)) >> + /* >> + * pull_rt_task() can drop (and re-acquire) rq->lock; this >> + * means a dl or stop task can slip in, in which case we need >> + * to reschedule. >> + */ >> + if (pull_rt_task(rq) || >> + (unlikely((rq->stop && task_on_rq_queued(rq->stop)) || >> + rq->dl.dl_nr_running))) >> resched_curr(rq); >> } > Same as before; why is the normal wakeup preemption check not working? I will drop these two patches and send out v3. :) Regards, Wanpeng Li > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/