Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758005AbbLBLtq (ORCPT ); Wed, 2 Dec 2015 06:49:46 -0500 Received: from mail-lf0-f43.google.com ([209.85.215.43]:35100 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757376AbbLBLtp (ORCPT ); Wed, 2 Dec 2015 06:49:45 -0500 MIME-Version: 1.0 In-Reply-To: <565ED709.3030305@unitn.it> References: <1448971807-11118-1-git-send-email-wanpeng.li@hotmail.com> <565ED709.3030305@unitn.it> Date: Wed, 2 Dec 2015 19:49:43 +0800 Message-ID: Subject: Re: [PATCH v4] sched/deadline: fix earliest_dl.next logic From: Wanpeng Li To: Luca Abeni Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , "linux-kernel@vger.kernel.org" , Wanpeng Li Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2024 Lines: 53 2015-12-02 19:33 GMT+08:00 Luca Abeni : > Hi, > > On 12/01/2015 01:10 PM, Wanpeng Li wrote: >> >> earliest_dl.next should cache deadline of the earliest ready task that >> is also enqueued in the pushable rbtree, as pull algorithm uses this >> information to find candidates for migration: if the earliest_dl.next >> deadline of source rq is earlier than the earliest_dl.curr deadline of >> destination rq, the task from the source rq can be pulled. >> >> However, current implementation only guarantees that earliest_dl.next is >> the deadline of the next ready task instead of the next pushable task; >> which will result in potentially holding both rqs' lock and find nothing >> to migrate because of affinity constraints. In addition, current logic >> doesn't update the next candidate for pushing in pick_next_task_dl(), >> even if the running task is never eligible. >> >> This patch fixes both problems by updating earliest_dl.next when >> pushable dl task is enqueued/dequeued, similar to what we already do for >> RT. >> >> Signed-off-by: Wanpeng Li > > I ran some tests with this patch, and I found no issues; so, you can add > Tested-by: luca abeni > > I just have one minor comment on the patch: > [...] >> >> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c >> index 8b0a15e..8ac17c7 100644 >> --- a/kernel/sched/deadline.c >> +++ b/kernel/sched/deadline.c >> @@ -87,6 +87,8 @@ void init_dl_rq(struct dl_rq *dl_rq) >> >> #ifdef CONFIG_SMP >> >> +static struct task_struct *pick_next_pushable_dl_task(struct rq *rq); >> + > > I think with the new version of the patch the addition of these 2 lines > becomes useless. Thanks for your time, just send out v5. :-) 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/