Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932480AbbLCIh4 (ORCPT ); Thu, 3 Dec 2015 03:37:56 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35588 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932223AbbLCIhx (ORCPT ); Thu, 3 Dec 2015 03:37:53 -0500 Subject: Re: [PATCH v5] sched/deadline: fix earliest_dl.next logic To: Wanpeng Li References: <1449056847-17190-1-git-send-email-wanpeng.li@hotmail.com> <20151202120454.GZ20439@e106622-lin> <565EFB6A.10607@unitn.it> Cc: Wanpeng Li , Juri Lelli , Ingo Molnar , Peter Zijlstra , "linux-kernel@vger.kernel.org" From: Luca Abeni Message-ID: <565FFF5F.3000303@unitn.it> Date: Thu, 3 Dec 2015 09:37:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1470 Lines: 38 Hi, On 12/03/2015 03:25 AM, Wanpeng Li wrote: [...] >> @@ -202,16 +197,18 @@ static void dequeue_pushable_dl_task(struct rq *rq, >> struct task_struct *p) >> >> next_node = rb_next(&p->pushable_dl_tasks); >> dl_rq->pushable_dl_tasks_leftmost = next_node; >> + if (next_node) >> + dl_rq->earliest_dl.next = rb_entry(next_node, >> + struct task_struct, >> pushable_dl_tasks)->dl.deadline; > > Juri mentioned "updated leftmost", I'm not sure if it means that: > > @@ -195,6 +195,9 @@ static void dequeue_pushable_dl_task(struct rq > *rq, struct task_struct *p) > > next_node = rb_next(&p->pushable_dl_tasks); > dl_rq->pushable_dl_tasks_leftmost = next_node; > + if (dl_rq->pushable_dl_tasks_leftmost) > + dl_rq->earliest_dl.next = > rb_entry(dl_rq->pushable_dl_tasks_leftmost, > + struct task_struct, > pushable_dl_tasks)->dl.deadline; > } This is basically the same thing I tested (I just used "next_node" instead of "dl_rq->pushable_dl_tasks_leftmost" because the name is shorter), so I think it should work. Luca -- 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/