Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6941142rdb; Fri, 15 Dec 2023 12:31:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnkbz4GZzl68bydvl1BsIKYyFl5aqHoPJN2lV9TCg/ZNnGeloJmOIr/H9lidHY9PCGQwhY X-Received: by 2002:a05:6a20:6a10:b0:191:b226:f927 with SMTP id p16-20020a056a206a1000b00191b226f927mr3547198pzk.87.1702672312271; Fri, 15 Dec 2023 12:31:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702672312; cv=none; d=google.com; s=arc-20160816; b=kIHr7+MRlRrsekaO6axyzdReBnnv7Nvt5MExYe5FxReiZIutUrYQ7JrHGaVJs14rdg JWaHZ21l9IvFbaMsei8CwB+i4W2+oHO45It44rgpAQJZ1mmofuXYpS4V9+3YkyDTR2s4 qY4CA2WLlAmN2zNQU6WnOX3AoOT/AeIaWq5ZiWapWELl36q77pUJQP62il4r1NI/dZl8 rQmbjPcym7iUACsa7K+MAaS5Tx4/koGCmRGGRKax+WmPo9O5fIu949xjyXp3gOjPWY5s EE/td0gIBpPaAdiLrMkVcMSXkcAd9m52Fc9yncsFHLXTgsBfOoBD4qLJlUp4fb65MIYS G35A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=AV8Deyj9TYdQdy5CajmLnDhaRNnCKxjQ1PqdBdJ4EJM=; fh=0/O+UTVrRZylCc783Vl6kL9hZtiWDkMzZ0z0WDUuflU=; b=xGYimAsuTm5cIw+sed+EJ7TywkHFo74su0OtIJ14xR0i2PF8HBEvSLsA/vlO2ILOnC SX1mGBTg2ueqPSj84MRFSskRW2XU+/pdNAs00XiKK9QoPzRLHQngWfLMlM7DUtRyVJ1t sB4wEVkjIjM871naQxH6bAu6nLuMa8anzzaW+9X9e5u3B4O4DT15GIcxksmsH7tDVU7A BuoUuOMKSpyWUaRs0Tw3lDGhGR+4nUu4LLelW842CMpSQERgsDQHK6Fi1R27qv/wQ8DZ BwA2LNzoaMpcJ7x5HYvCgpP5JMJTcpXvLOhNG6/h8xhmMbni8OqRpeCFCbKSQYUgIEkC LMPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0hNfw9Ot; dkim=neutral (no key) header.i=@linutronix.de header.b=ULDG6o8E; spf=pass (google.com: domain of linux-kernel+bounces-1628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1628-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p12-20020a17090a868c00b0028b2224bc03si2235817pjn.33.2023.12.15.12.31.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 12:31:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0hNfw9Ot; dkim=neutral (no key) header.i=@linutronix.de header.b=ULDG6o8E; spf=pass (google.com: domain of linux-kernel+bounces-1628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1628-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5DD32286AF9 for ; Fri, 15 Dec 2023 20:31:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6DCB41842; Fri, 15 Dec 2023 20:31:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0hNfw9Ot"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ULDG6o8E" X-Original-To: linux-kernel@vger.kernel.org Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0853846D for ; Fri, 15 Dec 2023 20:31:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702672302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AV8Deyj9TYdQdy5CajmLnDhaRNnCKxjQ1PqdBdJ4EJM=; b=0hNfw9OtAvMznhuvLMPm+94+DO74/skheTC/tno/6JVctZ0WK77V+5A1m8S5py5upF0cIt KBS8rf+SVEjMoDPMoeRlJ1z8S8Zkpbf6NRXsA+/Y/dUjOZzdQRLZnmuxQeivJg2uH6Rn2Q 01DiEilLbhQC2eVbS1ImREN/hsDihC3d82aBVgiWBRweQLqf6K6Po7Wi/GGnhAP7RM0c06 tUuIV0blJIw3p7XnD0AeBARMCOHMdRuCxIupM+yZknRGFvFzcD3L6yBm1SwiLQOxF6lbIR endMrhsYIsk5paFFfScn5+Oe2QzbtgynfJ5WwwjYPnM8kOXeYugLMRb1wnrumQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702672302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AV8Deyj9TYdQdy5CajmLnDhaRNnCKxjQ1PqdBdJ4EJM=; b=ULDG6o8EI1Dh6y7rb57F+9UbIcho+XrRpbO0WRNsthm0sQ6dtmhbcGIPZmbaHmhrhdqDcv VlRFeqFtPdCJkBCA== To: James Morse , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , James Morse , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, Frederic Weisbecker Subject: Re: [PATCH v8 01/24] tick/nohz: Move tick_nohz_full_mask declaration outside the #ifdef In-Reply-To: <20231215174343.13872-2-james.morse@arm.com> References: <20231215174343.13872-1-james.morse@arm.com> <20231215174343.13872-2-james.morse@arm.com> Date: Fri, 15 Dec 2023 21:31:42 +0100 Message-ID: <874jgjmclt.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Dec 15 2023 at 17:43, James Morse wrote: > tick_nohz_full_mask lists the CPUs that are nohz_full. This is only > needed when CONFIG_NO_HZ_FULL is defined. tick_nohz_full_cpu() allows > a specific CPU to be tested against the mask, and evaluates to false > when CONFIG_NO_HZ_FULL is not defined. > > The resctrl code needs to pick a CPU to run some work on, a new helper > prefers housekeeping CPUs by examining the tick_nohz_full_mask. Hiding > the declaration behind #ifdef CONFIG_NO_HZ_FULL forces all the users to > be behind an ifdef too. > > Move the tick_nohz_full_mask declaration, this lets callers drop the > ifdef, and guard access to tick_nohz_full_mask with IS_ENABLED() or > something like tick_nohz_full_cpu(). > > The definition does not need to be moved as any callers should be > removed at compile time unless CONFIG_NO_HZ_FULL is defined. I can pick that up separately, but I'm fine when it goes with the resctrl lot. For that case: Reviewed-by: Thomas Gleixner