Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1960254ybl; Thu, 19 Dec 2019 05:55:36 -0800 (PST) X-Google-Smtp-Source: APXvYqzbZc2BUgdagrZ3UAtkCF74FMxht18p4WQd+U7PZF8y3PHimzEZ1KzdMURzXUhFTPbaCpYb X-Received: by 2002:a05:6830:1f19:: with SMTP id u25mr9183651otg.170.1576763736742; Thu, 19 Dec 2019 05:55:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576763736; cv=none; d=google.com; s=arc-20160816; b=uqLrTXUJUXbDwU69G2LBtvVfwkK9BFU5HKndUixJffmQJf/olA/isnPny4+8nQkxzE i3subpvjUx2HWZKjnNuuLLJf7gJcfEU1CJsXVgqGcDHKVDI+LcWHS8S6iE33KQndMSYy JewvY25/dWN+4F1GkIKqFGrWtZ0vdCfL3KMupEetntBtSUDdN63Z50n1IagLMKDLZzKa TOxmH3t8Iwz61jvWDM1naup81lAf+JQC3NevblImmeTxvmTKWGHNzX1OfFaS0a1VGP1d hI6Ko6Lo50BFbxUVi+dxEoDf4tXTiPKlBrj4RL8vv111EI5tQlgT/vkV6z3adXIZ5jjZ sPvA== 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=Z7obWPRua+ECbSKbrq1eKOe5Xc284mCnD5PiHcQRuRk=; b=VDN3j3rO4O0LgA1WmaSb0RLmaP3s2lX4BmwFiXS/le/0KTejw1qb7uPQC4GNb+Xg1N wqbwrXiHNgmmromXuACzqP98GyOB830OQoFoMfeURaUDent05Vq7Hnz+Yd1DELAYFIxK Mr9YUq4iYWpklAOlL2boRka4BZn+WVTwEqWaIe+wMtb81i+AiarpbRmb7TJT+GNPXg/u Zy6Pn2LSBRf72/eswOhv8x9DZVolmxgxK47mIGZGoPSRAdRTxEw34THFL/TUp7AshR7i IMr1sq9J4coOo/8sCZS/QhUR7/HG8xnl59IZCYqNPuwMdzyGAWbNbtOIcXo/98CzVJTu l18g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=GcH8KUXB; 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 g26si3510374otn.180.2019.12.19.05.55.25; Thu, 19 Dec 2019 05:55:36 -0800 (PST) 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=GcH8KUXB; 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 S1726877AbfLSNyG (ORCPT + 99 others); Thu, 19 Dec 2019 08:54:06 -0500 Received: from merlin.infradead.org ([205.233.59.134]:47100 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726813AbfLSNyG (ORCPT ); Thu, 19 Dec 2019 08:54:06 -0500 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=Z7obWPRua+ECbSKbrq1eKOe5Xc284mCnD5PiHcQRuRk=; b=GcH8KUXB+W12rkpgXcmf4qyVv cjt4Pjbj4rEvEIyg52GuYu8l6g2oHOkVDg8fyo4lzBUYmNTuOMoLJW3IZROo1MPW8bDiDUo61sY+4 ma8AMsXFmUGnb2c5HuIZkPdBVYzHo+R9xb0VrWVcOmQOL3gpYI9Bmoq8ouXpkixu12k56NGErFAl5 hamOxtifkGJsdr8gU+bozCK/gAsIxvtyJbhXnLKI3fgW8kIvuOc59ZjMV9quSQvxAMpLzUiz/FgwH KgSUMsPzRgjYZijlNJMVI0AdMiS5KILDemlobSf2S2dIHznjcw+gOF6QLlLd7tu1W+yosLh3BzJih x6wP4KpYA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihwFU-0000op-Bd; Thu, 19 Dec 2019 13:53:52 +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 8B7E23006E3; Thu, 19 Dec 2019 14:52:26 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1A5832B3E1690; Thu, 19 Dec 2019 14:53:50 +0100 (CET) Date: Thu, 19 Dec 2019 14:53:50 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: Kirill Tkhai , mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] sched: Micro optimization in pick_next_task() and in check_preempt_curr() Message-ID: <20191219135350.GA2844@hirez.programming.kicks-ass.net> References: <157675913272.349305.8936736338884044103.stgit@localhost.localdomain> <20191219085042.0a29437b@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191219085042.0a29437b@gandalf.local.home> 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 Thu, Dec 19, 2019 at 08:50:42AM -0500, Steven Rostedt wrote: > On Thu, 19 Dec 2019 15:39:14 +0300 > Kirill Tkhai wrote: > > > @@ -6569,6 +6558,11 @@ void __init sched_init(void) > > unsigned long ptr = 0; > > int i; > > > > + BUG_ON(&idle_sched_class > &fair_sched_class || > > + &fair_sched_class > &rt_sched_class || > > + &rt_sched_class > &dl_sched_class || > > + &dl_sched_class > &stop_sched_class); > > + > > Can this be a BUILD_BUG_ON? These address should all be constants. Nope, BUILD_BUG_ON() is for compile time constants, these are link time constants.