Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11909955ybi; Fri, 26 Jul 2019 01:38:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWTgXzePBS9th/up8WVScSusytsRXu3XWmunhrh6ccklJvXaRKgmQ60DuiEb59d9hztziw X-Received: by 2002:a17:90a:8591:: with SMTP id m17mr98536752pjn.100.1564130327848; Fri, 26 Jul 2019 01:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564130327; cv=none; d=google.com; s=arc-20160816; b=BipQKRjYomuAKuihgh3OSrLmzbW9UBHsMFJKTLeMfyvvP8pmQJfhY/+U0HoDIhEYh+ H1VVIcyrGLwkKvAmuXDGqtqjWVjUt4+KmW1y8O14hGmDATNm3WPQDx3TIOB8lSkkx7/A GhsdgwpavhaYzQKKJbAStLWCvvvzFC+IcQOzqLHSCvOurZzMcggksgzlHyk1KC2hQJPH ALcHvyroCrRHgojTeoNx7udLslletKdxUqA4RFIG24KFeQ8L44lW2Hm1oW9LtX9lP+P7 8X5nbW48YHzhOdaC2ZkcCIUEUyHqKunDhoKsrhjwb61HeA2+xsq4dinZH2N09pRvATYR /iQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=sz6K17/LXUw/Qbkr9W175ZF5AV3kg+HZApNBD916SNI=; b=qD3xuGXUv6dIqh0dyAqdUuU9nNrr+TFBsAMWslWd7nxx0z7+v9AWOZwoU9Xi34ixTJ p+PhX1VeWHpRPTSaJ2Sysc+NuwXAK2C1CxmjcFeuPrhdtCUXAqCZgaKTc9lZeU0W172K lD4P0CrXeyMERGnZaCM3xUk3rZf/fE34TVgnwXERU7MgrhzjYGk1NxpZG33Xx7sDp+7L 9bT1kFiFXiBttj7riICOJhaVB8r/HtNWhAyazPTMmoC+MVQJRe2b/832m2h2+fK9PWey pUoJPp++Gh6Htp/WjojCsHFK9c5B2einhmk4yOZw8ehOSd/cVha5VROd/6P6Nm1df+Ld 44Hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e123si20379159pfa.252.2019.07.26.01.38.32; Fri, 26 Jul 2019 01:38:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbfGZIhd (ORCPT + 99 others); Fri, 26 Jul 2019 04:37:33 -0400 Received: from foss.arm.com ([217.140.110.172]:39620 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfGZIhc (ORCPT ); Fri, 26 Jul 2019 04:37:32 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2EF41344; Fri, 26 Jul 2019 01:37:32 -0700 (PDT) Received: from [10.1.194.37] (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2774F3F71A; Fri, 26 Jul 2019 01:37:31 -0700 (PDT) Subject: Re: [PATCH 4/5] sched/deadline: Cleanup on_dl_rq() handling To: Dietmar Eggemann , Peter Zijlstra , Ingo Molnar , Juri Lelli Cc: Luca Abeni , Daniel Bristot de Oliveira , Qais Yousef , linux-kernel@vger.kernel.org References: <20190726082756.5525-1-dietmar.eggemann@arm.com> <20190726082756.5525-5-dietmar.eggemann@arm.com> From: Valentin Schneider Message-ID: <0f460dba-4677-00de-59a2-5cd31ffe6e4b@arm.com> Date: Fri, 26 Jul 2019 09:37:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190726082756.5525-5-dietmar.eggemann@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/07/2019 09:27, Dietmar Eggemann wrote: > Remove BUG_ON() in __enqueue_dl_entity() since there is already one in > enqueue_dl_entity(). > > Move the check that the dl_se is not on the dl_rq from > __dequeue_dl_entity() to dequeue_dl_entity() to align with the enqueue > side and use the on_dl_rq() helper function. > > Signed-off-by: Dietmar Eggemann > --- > kernel/sched/deadline.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > index 1fa005f79307..a9cb52ceb761 100644 > --- a/kernel/sched/deadline.c > +++ b/kernel/sched/deadline.c > @@ -1407,8 +1407,6 @@ static void __enqueue_dl_entity(struct sched_dl_entity *dl_se) > struct sched_dl_entity *entry; > int leftmost = 1; > > - BUG_ON(!RB_EMPTY_NODE(&dl_se->rb_node)); > - > while (*link) { > parent = *link; > entry = rb_entry(parent, struct sched_dl_entity, rb_node); > @@ -1430,9 +1428,6 @@ static void __dequeue_dl_entity(struct sched_dl_entity *dl_se) > { > struct dl_rq *dl_rq = dl_rq_of_se(dl_se); > > - if (RB_EMPTY_NODE(&dl_se->rb_node)) > - return; > - Any idea why a similar error leads to a BUG_ON() in the enqueue path but only a silent return on the dequeue path? I would expect the handling to be almost identical.