From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754080AbbJPIv4 (ORCPT ); Fri, 16 Oct 2015 04:51:56 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:10007 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbbJPIvw convert rfc822-to-8bit (ORCPT ); Fri, 16 Oct 2015 04:51:52 -0400 Subject: Re: [PATCH] Fix migration of SCHED_DEADLINE tasks To: Luca Abeni , linux-kernel@vger.kernel.org References: <1444907357-13114-1-git-send-email-luca.abeni@unitn.it> <561FD6F3.4090209@arm.com> <5620AF64.4050208@unitn.it> Cc: Peter Zijlstra , Ingo Molnar , Wanpeng Li From: Juri Lelli Message-ID: <5620BAA5.5010807@arm.com> Date: Fri, 16 Oct 2015 09:51:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5620AF64.4050208@unitn.it> X-OriginalArrivalTime: 16 Oct 2015 08:51:45.0902 (UTC) FILETIME=[E317C8E0:01D107EF] X-MC-Unique: 3EZfOM_oTlmXH0D6GscRlw-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 16/10/15 09:03, Luca Abeni wrote: > On 10/15/2015 06:40 PM, Juri Lelli wrote: >> On 15/10/15 12:09, Luca Abeni wrote: >>> Commit 9d5142624256 ("sched/deadline: Reduce rq lock contention by >>> eliminating locking of non-feasible target") broke select_task_rq_dl() > [...] >>> - dl_time_before(p->dl.deadline, >>> - cpu_rq(target)->dl.earliest_dl.curr)) >>> + (dl_time_before(p->dl.deadline, >>> + cpu_rq(target)->dl.earliest_dl.curr) || >>> + (cpu_rq(target)->dl.earliest_dl.curr == 0))) >> >> Can't we actually use dl.dl_nr_running here and below, so >> that we won't incur any wraparound problem? > Ok, I tested the patch with dl.dl_nr_running and if works for me... > > I am going to send the updated patch in few minutes. > Thanks! > BTW, should we also use "dl_rq->dl_nr_running == 0" instead of > "dl_rq->earliest_dl.curr == 0" in inc_dl_deadline(), and remove the > comment from init_dl_rq()? If you think it is a good idea, I'll test this > additional change and send a patch in next week. > Yeah, it seems we need that fix too. Best, - Juri