Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp21425rdb; Mon, 22 Jan 2024 10:33:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXnB+yjNw78csH/aayjCNrbGnGsoTWljDVXOsAR6mpWFL+rt7Fyo2+6o0YRsws3CuU949d X-Received: by 2002:a17:906:6806:b0:a2e:4984:297d with SMTP id k6-20020a170906680600b00a2e4984297dmr2382567ejr.100.1705948430233; Mon, 22 Jan 2024 10:33:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705948430; cv=pass; d=google.com; s=arc-20160816; b=Fr4IHet1rBrNppvB5YvF7KiuLu82DYQMtlwdW5XobydY0PALer9RtVK1Smeh5HxVwM Ghj1BMOuU7Gy/oRGl66Z5gH7/MOAd0NHmpG2swOQxxGBzo2u2YQbGM4bMKYkW+5F7U1G VHK7N2W6GMsqMyNQMWwyOSLfQ4eSghjIMfOzl0ODF2twE+iE2zlx589QrwMF1qGCGYO9 cuhtS6Pt5BOehI/lAIJ8LGHiLEbA+C3nDgG643iEiPnhN3KTxB69XOAxLE8ZOuCBieex /bKBEag1gOY0ElxeoF/Prd/BpwUuT3y6LWKICSbSNMHv/2FEm9mUSdI9rmRUXRo3gnGu U+PA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=9fAumUvQOX0X6U44eg2upuztW2cUAYClbtHKjipRQUI=; fh=ch3XKTG5cmrt8VQxxy0QcfFVVPd1T7wTxDtQog7EWoE=; b=Gy/azRs1uLzJ1DBlKJF0qsV5+Tj1TMmtztJbGlpk5/ZqxZKL3jVNEHBJ2Da4oZOH7s nHRbLhu6bWpavD7nMNCXLP+hAKNSChF6Fq1+caMkVpVHf2LLJuOfrGw75JQ/p4Il0/T0 sCeXZylBxvG/H1UICS4IoMxqwR/eU+QEkuc+B62ON5V6g5pQ4NAgqZSIcmkScK0V9/dw sdQ6bVdoShqZxmc1OiceBzMc09XtlSkQJDCErEVyUByfXASKm0YGrK/WEidcVujwCft4 q7goxG1ERwaxvjutdewzzJ88wxNXj86VOIrOiw2YU1QTEQ74odBqM6HZJZbNe7E6ZWAp ePmA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-33892-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kh3-20020a170906f80300b00a2336235429si10724375ejb.587.2024.01.22.10.33.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 10:33:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33892-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-33892-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id B254D1F241D1 for ; Mon, 22 Jan 2024 18:31:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C4065C8FB; Mon, 22 Jan 2024 18:05:30 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4BFC33FB17 for ; Mon, 22 Jan 2024 18:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705946729; cv=none; b=tqbuP0h/RFOmrytamQorIunNJn4IO1nvugIyLrUMkk1MyXqwzMtvZ2gdyMLWTJJTikQBkctLLyqfETtnP+9+/Cw+sctBhyxmCL3BKsSK7dAQ/WU+WJVIToUqUWdAzmrAwv+sq+KEhY0VYmf+wIytwYpcOQwfJ3wSdylOSpq/tKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705946729; c=relaxed/simple; bh=9fAumUvQOX0X6U44eg2upuztW2cUAYClbtHKjipRQUI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ad7TYk8SduKW4GuWp9AQ6U6bhynEdkTNfgWNdad0MOESfyRUULA+S47LWBnO0Tz5QsB/ZZXnmJU22WDbjZ9jYqLrYBeNE9vkAOlKjBasdxbp4Lm5NA6eJT1be+YPb59w2XggAAkyJgDU3un6IZ2VRp6njPLWOMB1COtLPzMHX5c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7F7101FB; Mon, 22 Jan 2024 10:06:11 -0800 (PST) Received: from [10.1.197.60] (eglon.cambridge.arm.com [10.1.197.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D4BE3F5A1; Mon, 22 Jan 2024 10:05:22 -0800 (PST) Message-ID: <583e6c89-98c5-5415-0091-8b1758d8f785@arm.com> Date: Mon, 22 Jan 2024 18:05:21 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v8 01/24] tick/nohz: Move tick_nohz_full_mask declaration outside the #ifdef Content-Language: en-GB To: Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , 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 References: <20231215174343.13872-1-james.morse@arm.com> <20231215174343.13872-2-james.morse@arm.com> <874jgjmclt.ffs@tglx> From: James Morse In-Reply-To: <874jgjmclt.ffs@tglx> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Thomas, On 15/12/2023 20:31, Thomas Gleixner wrote: > 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 Thanks! James