Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp537100ybt; Wed, 24 Jun 2020 05:29:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLPjjdhgecClMILXyH+kRYxcScx4qC/iMRrFQXPyIqg970lWD2+kOAo2iK20EPHTyk5NE3 X-Received: by 2002:a17:906:74dc:: with SMTP id z28mr21091328ejl.402.1593001775379; Wed, 24 Jun 2020 05:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593001775; cv=none; d=google.com; s=arc-20160816; b=JuKdvTr4ZmXYgfM7TidIvMP9Ut520B7BpUX6zIsb4pUesrV0KbozxQYbEp8r+IzgU5 AaQV1ZhFr2gsio3M804tbFo5Oe67bfu9A2KsihOi1+rcJIkLxq8FpjpI8fIpN0IEiVFU LEUCqMqk6ZYJVEoC3ubNvw7RdVJR6BiU2wkhYoG8lfB3XmITZpbXdYOPG3UhhnFhBQj/ oze7ybPr9YYvuiRiJQAOwQzsMQ+PWk9TT21SkMaufNw8lh9aYEHCJWrPelE2QJkc6Ywt /Sw63cUDpJl+Y5hfHNHbwEdRNpJzFJkyiHaKK1gel0bqyvGO8zVrAv7BvdPlWl+1FWXy MMEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=p0kBSMT/fu/rPYSInmx/NcnvSTQq1hWoN5HJf9kznb8=; b=zlpTMMo7PJ60hOsl9k/ttPTunGx9lmjiqaBZYgBDL2YIwh7zboIvrPAJvpL9IWNsDq XQKqaGEfGk/M48+v9kHCl5YsYBsNfH6xqt1rt7BFbxSXexIrsHP2W4Y9Re7ad/nZ46bv T9N4wVf+GoRhzqDFfzaXIgP0D2t7rQKHyJPGk6hxFp0GunlzhXC3rd/IYGcxpP02ygPh +bZsP1eSnGxgLKWdJSn9hwCiE3NeEhgCBeowRW6fxNmatp6DBddY5QzwrskK4nClSOKh 59IzFk2P6LCWEqhGVdqk+i46WQz2VC5rMqMm4tDw9iFaiIf4YWp/NDLNdeTVIaRIiF9M mq7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=BY5FnQW2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si10562425ejs.213.2020.06.24.05.29.11; Wed, 24 Jun 2020 05:29:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=BY5FnQW2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389183AbgFXM2s (ORCPT + 99 others); Wed, 24 Jun 2020 08:28:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388296AbgFXM2s (ORCPT ); Wed, 24 Jun 2020 08:28:48 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3B18C061573 for ; Wed, 24 Jun 2020 05:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=p0kBSMT/fu/rPYSInmx/NcnvSTQq1hWoN5HJf9kznb8=; b=BY5FnQW2JaWt9zPy4xJIPJiAVy 7KH8lucO65rP6NhfplKEQMw9/7ZvO5hXlXzBmz+aYnF7Kb6DdP8okf6+NLnbPAS6PofQqzZ1yoFzU LkaXPWJJ/mfFmGqXolNFuFOr99KKrTzeuKakX1wue35bq4QW/zpWtaLDMalAxy77arol+/22aVtvv nJkQpHV0HNc9Zf1/+IGKsyHAfuFWbtrq5wc6ZF7NySVVqmqvRFMgwnLmc9dps45foYXl6G59Yu89O ryBShwpTuJaKX5JDo5kv6NYkiZWcpPCz4pL485o9w4UELBzyjWeNxHXmsvAimTDDzkfZybQDSz0Qa o8l/Opzg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo4Vo-0003WT-PD; Wed, 24 Jun 2020 12:28:21 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D4BDC3003E5; Wed, 24 Jun 2020 14:28:19 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BA00B21211CCA; Wed, 24 Jun 2020 14:28:19 +0200 (CEST) Date: Wed, 24 Jun 2020 14:28:19 +0200 From: Peter Zijlstra To: Patrick Bellasi Cc: Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Chris Redpath , Lukasz Luba , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] sched/uclamp: Protect uclamp fast path code with static key Message-ID: <20200624122819.GG4781@hirez.programming.kicks-ass.net> References: <20200619172011.5810-1-qais.yousef@arm.com> <20200619172011.5810-3-qais.yousef@arm.com> <87pn9oor2t.derkling@matbug.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pn9oor2t.derkling@matbug.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 09:34:02AM +0200, Patrick Bellasi wrote: > > +static DEFINE_STATIC_KEY_TRUE(sched_uclamp_unused); > > I would personally prefer a non negated semantic. That's what I said earlier as well. > > + */ > > + if (static_branch_likely(&sched_uclamp_unused)) > > + return; > > Moreover, something like: > > if (static_key_false(&sched_uclamp_enabled)) > return; > > is not just good enough? static_key_true/false() are the deprecated API.