Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11953254ybi; Fri, 26 Jul 2019 02:22:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcdQjnamUpHI1d2ZB6fMXHhadr5vWYMpuqpTh27GZjTQR3uE5uUsA1jxZWrv5D43yxHA/u X-Received: by 2002:a17:902:20c8:: with SMTP id v8mr95803486plg.284.1564132954296; Fri, 26 Jul 2019 02:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564132954; cv=none; d=google.com; s=arc-20160816; b=HawCzvhBbMgrg8UfmQ/mAZOBdctiT0S479TcIiAXU5QlZNjAREevInN2DZkjtTCc/1 Whf/4GxSkuWePU2UQA9q57jNkEej4UUGomJqFkeeV5yyw9udrhpyS2qlYq1Jw+UWhQBH Z5j8sQWN7cazFufN77N4ijiYd23a2Rbp9qZGgw0s920RY+Es8Mr70ebvkNOLFqKV1/ga z2rYYZfDjzt1pljm0EmRX5tIQ2Lgf0R8Ea75Mc6tURAT1QFpzQC5iMXJ9BXnpNZMbf1H pRytoOQU0bQ5aeWL1vm9D1wZvSrZxlMepX96jogSIFAFvcJ3X8vjMfVC+zJm/VSHt3Nv K12g== 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=zEHnLlgAE1F9o6ePfjZnmyUfCv46Keatw9zPZPEqKp8=; b=N4BngiXR+u2VstfklQhJOBCBuBvJFhxJw2IWPIl6vsSxdVgny65n/+sLufS6wZWDz3 djdw8xUbsP6FB1GGjjjioRWrhFXffmhiyBrxmW0kLwj3c2JJNN43VFqvpPCeHU0hBAx1 cs4ITlANoqAWjpd4Cqf6RTOmq2mtlkjOfDSVOpQZXPBfK3UJ8yhrO5HnQZkOYtdzomg5 NQqx/e5hUmgEYxdx3yw96ONbo6BgcK9vEF+L1oy8hW6qyKpicHW4S0qmcBn/qBx1itFP YqheldRiQns8GRJV8nzR0VMe86Hvdmm/tgbjBaP6cEAada8T2BZHcBHzKHl2QqWICz8G YFKQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si22618519pfg.87.2019.07.26.02.22.18; Fri, 26 Jul 2019 02:22:34 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726191AbfGZJUL (ORCPT + 99 others); Fri, 26 Jul 2019 05:20:11 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37342 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbfGZJUK (ORCPT ); Fri, 26 Jul 2019 05:20:10 -0400 Received: by mail-wr1-f68.google.com with SMTP id n9so28567383wrr.4 for ; Fri, 26 Jul 2019 02:20:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zEHnLlgAE1F9o6ePfjZnmyUfCv46Keatw9zPZPEqKp8=; b=ijLVBWkse1pN0fMXduTA/xB4GXtD4ubH24s9nA+k1XSc52OEjmpMaL1oUvJT5VZXM4 UbgwF646j8ib04rc4CADRvR3KfEZZc3Jm5w0/X6y5dvxqTpHzabjIFd5SCMZOd51fZeJ vwzEFoS3bEHgYrstBAR0vp+HMrGhD6MBsq0py85+cqSwYdu4NJzPlDSZH8iXn86/m44W 6xePPiEjGtauSi2cQRZhiOUXDbC6X9SB7y5L7OFLV8HQvwM0Pm1hYqttdICIDy1OYNjL h91Donl8oQsgzxSnWZZYUA5qo9+GTW9JR8CIx+w+QkM1t7kpm3Xl/rV5CesEPWDJQnYW sFzg== X-Gm-Message-State: APjAAAXckvfJmsTLda5xqMEJhitgW6w35f87PAN4BZiz11g+fo9V/qD8 e0aqKtVKGiqd9pGUGbMTvotlEA== X-Received: by 2002:a5d:4a02:: with SMTP id m2mr99040297wrq.78.1564132808208; Fri, 26 Jul 2019 02:20:08 -0700 (PDT) Received: from localhost.localdomain ([151.29.237.107]) by smtp.gmail.com with ESMTPSA id j10sm52483595wrw.96.2019.07.26.02.20.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jul 2019 02:20:07 -0700 (PDT) Date: Fri, 26 Jul 2019 11:20:05 +0200 From: Juri Lelli To: Valentin Schneider Cc: Dietmar Eggemann , Peter Zijlstra , Ingo Molnar , Luca Abeni , Daniel Bristot de Oliveira , Qais Yousef , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/5] sched/deadline: Cleanup on_dl_rq() handling Message-ID: <20190726092005.GO25636@localhost.localdomain> 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=us-ascii Content-Disposition: inline In-Reply-To: <0f460dba-4677-00de-59a2-5cd31ffe6e4b@arm.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 26/07/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. > Task could have already been dequeued by update_curr_dl()->throttle called by dequeue_task_dl() before calling __dequeue_task_dl(). Thanks, Juri