Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11928562ybi; Fri, 26 Jul 2019 02:00:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyb5gpYkyPrYfe62P4j2WVbnlTw6F6H/KUyWNKln6AfPpfBHjgzVCdI3SzX9jQsaFVxoGQ2 X-Received: by 2002:a17:902:543:: with SMTP id 61mr95098350plf.20.1564131630222; Fri, 26 Jul 2019 02:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564131630; cv=none; d=google.com; s=arc-20160816; b=UVc2/iFBq5UzDAbYWD5hc9M+QZxOVvmpDmAwmMUSZSZ5hqztnLkR7IJIPWZ/EK5dAq lC4tv29xFDITOD/7b4b9H70A5muO9Akdvl4URih1Qnx5cf9xq6afhUr/nv76mcldrYs6 blrhCSh/ttwa+araEIDmefNcrCg+zKKqHNo/sEzGEbE1mUYvRrAmC5Q4CRFbxNbcg2hP oSRyXU1fKer4kPFXDxBcjKeA76Grg8GdNl83C1ubcKjGy36+6VsyJLw/JBXpTAwJN1DF tHGylvJ9StGDcXbWR7oaCW/LtWXDhzhwc7xQ4OPfmVI/lxZxPRtNjlMq5mFVq1jzQryy Ka7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=j29IBxL2Osy6w6VdSMLnZHtZBrWHRnBQ+b3Uzh+RLNU=; b=wgIUMiJQRoNtloUyaf1dMV2VL9NEpSsw41aRxK524xh2Gbin2f5nWspD4sa8RwrtvE K46I3N4rA1UptvS6vC/rDydIt1VYK/2x3jsC3S0iAf3jAMueoZ2JQzwTGX9hAyF59bbg MzKC4CGpxcciAXNuoU5J+vxQ86RFlMo2KK+y8hvFUrJ+7l+obNfxFneirAEYXxh8RKvx 7ogGOFFQqyHccKaTmc1rxuqzqaHzHGqio5sQhUGutSenzIKnbT0OACDoEWm1vfADfWJe 9NGRi2ZjENua3KzGgf0GHnO6zYRoTKXWBf9zygcXE8Xo/Ce2P56qUQBetueDzx7PHkq+ tNHw== 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 r14si18775198pgm.406.2019.07.26.02.00.15; Fri, 26 Jul 2019 02:00:30 -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 S1726447AbfGZI6J (ORCPT + 99 others); Fri, 26 Jul 2019 04:58:09 -0400 Received: from foss.arm.com ([217.140.110.172]:39838 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbfGZI6I (ORCPT ); Fri, 26 Jul 2019 04:58:08 -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 1849F344; Fri, 26 Jul 2019 01:58:08 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (unknown [10.1.194.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE0A83F71A; Fri, 26 Jul 2019 01:58:06 -0700 (PDT) Date: Fri, 26 Jul 2019 09:58:04 +0100 From: Qais Yousef To: Valentin Schneider Cc: Dietmar Eggemann , Peter Zijlstra , Ingo Molnar , Juri Lelli , Luca Abeni , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/5] sched/deadline: Cleanup on_dl_rq() handling Message-ID: <20190726085804.akigyryogf7lcx6m@e107158-lin.cambridge.arm.com> References: <20190726082756.5525-1-dietmar.eggemann@arm.com> <20190726082756.5525-5-dietmar.eggemann@arm.com> <0f460dba-4677-00de-59a2-5cd31ffe6e4b@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0f460dba-4677-00de-59a2-5cd31ffe6e4b@arm.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/26/19 09:37, Valentin Schneider wrote: > 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. nit: s/BUG_ON/WARN_ON/ -- Qais Yousef