Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3649376ybi; Mon, 29 Jul 2019 10:06:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRGE9nAC0GPiQIpRBfhyis8HGnzglupGzFaOq/7T0bFVwarTsGzOx5NC/N0eF5i5swFR3V X-Received: by 2002:a17:90a:8a84:: with SMTP id x4mr111227072pjn.105.1564419995958; Mon, 29 Jul 2019 10:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564419995; cv=none; d=google.com; s=arc-20160816; b=gNWpk2lrN4M0vGpL7iPOvquIZ8APyF5ksfN81b0+NIHeMJ53gNYYsAupTz8tViuMjE 7tagUF4BMxVzYiRb1otDaWDMA2AKsMfzRxv0wjq4zX4wEaiXIN60ucTtKZ2AAQea5dFl ietwRd3x90CCTh1Nr4sQm1TmylVFKNO7tSsXSTAQGjpHeEqXbFQyq1vK4CjGkCNE2cYP jLBUq5/CNUYYGRtWvhL7YMnm0CA+lfj5ujeBjlYFYUZIy3MGw+abb7rcVpRWU+/G4sW+ J9CDSZzA/Td//mSqCjbKlrymCvQ7Dx05enqB5ubDm2Ivw88Z/QAqUwpbcTzhA4ckfOx/ zNRA== 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:dkim-signature; bh=ih+8jGaNPkIieBi7y6bE+jbDtJCtU3TtT+BWz5ZYUcs=; b=b1l3sD4CV5iF5hVpZL7xHiwkCGxGjuXjFjJbIedVC6IeKvfoHZ/0opqxleS5Bk9AkG AqgYdAahlliYf7ucR7vcv3sbrJ0M4kJTUxP0M+mvfhNrm1G9ef8mQ92tL6r1ieTqeCAF r/6HZ1++jc1KOW2MlK+KP0z9Sg1bHVEfKkwXtWu8aXlOCz40RdIDs0A7WOW9+da7mRd9 xUyXS93BNvxUIkyN20yvB50wwV2EFXdco0oU1Auy69M0SjMebUSRXDy6U+y2Hnezngfx eWMFYVsUFNRwR5SJCzUMi8amUNipQW3fFN5Ue8dseH+aPd5ro/pO6lLyL0I48p6d6vcL DrlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YHqMNYEL; 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 y11si27226807pgo.115.2019.07.29.10.06.21; Mon, 29 Jul 2019 10:06:35 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YHqMNYEL; 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 S2387423AbfG2Qyj (ORCPT + 99 others); Mon, 29 Jul 2019 12:54:39 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48710 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726601AbfG2Qyj (ORCPT ); Mon, 29 Jul 2019 12:54:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ih+8jGaNPkIieBi7y6bE+jbDtJCtU3TtT+BWz5ZYUcs=; b=YHqMNYELuuLbpvCffz34gvm64 xLn8QrmVCqumw256N1Tbr3Q1IxHdrbm604ifmdOlJZzH9c3ZcHf6PAB5RJEiXGlELnKv72M6zPKqZ tZ3e2wrxlTnz1e1lVWerHYxaJDZUHWP5tEl58G/uss02SCnKj+1j9sGwV6iw69y9KPTpSpwfVamts SueXsslp9WaFwo2kT6/hrq7d/VTKD2VdJZ86gS+h2H0wzewhCkl9IOIOwYEP/OWKW2hNRrAN4nkM7 4YYJW3c7lgO2y6x8F2aFpNuv7lVtQD3XeU1OdJUeiaClyJ/MAaS+g4ZmQRGK0UOiRcQEEIRG6TXx3 nIVSfpPWA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hs8ux-0004Ib-Pq; Mon, 29 Jul 2019 16:54:36 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8DFF320AFFEAD; Mon, 29 Jul 2019 18:54:34 +0200 (CEST) Date: Mon, 29 Jul 2019 18:54:34 +0200 From: Peter Zijlstra To: luca abeni Cc: Dietmar Eggemann , Ingo Molnar , Juri Lelli , Daniel Bristot de Oliveira , Valentin Schneider , Qais Yousef , linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] sched/deadline: Use return value of SCHED_WARN_ON() in bw accounting Message-ID: <20190729165434.GO31398@hirez.programming.kicks-ass.net> References: <20190726082756.5525-1-dietmar.eggemann@arm.com> <20190726082756.5525-6-dietmar.eggemann@arm.com> <20190726121819.32be6fb1@sweethome> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190726121819.32be6fb1@sweethome> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 12:18:19PM +0200, luca abeni wrote: > Hi Dietmar, > > On Fri, 26 Jul 2019 09:27:56 +0100 > Dietmar Eggemann wrote: > > > To make the decision whether to set rq or running bw to 0 in underflow > > case use the return value of SCHED_WARN_ON() rather than an extra if > > condition. > > I think I tried this at some point, but if I remember well this > solution does not work correctly when SCHED_DEBUG is not enabled. Well, it 'works' in so far that it compiles. But it might not be what one expects. That is, for !SCHED_DEBUG the return value is an unconditional false. In this case I think that's fine, the WARN _should_ not be happending.