From mboxrd@z Thu Jan 1 00:00:00 1970 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 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" 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