Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1306681lqb; Thu, 30 May 2024 06:46:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4PkBNep3F2tBbClGdJFyFmMot+sfSL+SQT3+9J6EL+9cORqdIMDFWeYmU0DkTGn1cn+bFEakbDOzl1pSVXEHQBkSSUfwGIzJSd+EkSg== X-Google-Smtp-Source: AGHT+IELqvYT0H6nI0AZ7UECIYrN3GfcCBJ9w5l37TkJkhF1pKgx4hDSOy37HrT8HbKhblXBmeFY X-Received: by 2002:a05:6214:43c9:b0:6ad:78f2:fce8 with SMTP id 6a1803df08f44-6ae0ccd0b56mr24755126d6.54.1717076797318; Thu, 30 May 2024 06:46:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717076797; cv=pass; d=google.com; s=arc-20160816; b=pddieaLf7/U2LeuOE8EUwobhqAgs7DZiL1N6jd202o6NdBc4xICnKa5fWjruxHSkCo DwxQ+Rwx/nEnPtHOeYRDnBe3vcaVoDl+zHnL/3JBMlqo0/0AKMDpwvIcoP31i3sEBg/x sRJItN/foyuYSfpXbrp+Iy3dsw9vaLvs22qqPlYnDQwI5MjdIWy+qhHh3EMkoI9QXbWb U/Rp+gNoWNfhGA73vQfktX1QeCkLe+wg7zMMSwndPmhLDsyLTw5aT3Gml1w4HYBHhQXK PKaKzWK2v8gfDHy+AJfSwETi1ERPwhxKdo51qrY7oNJQoIcWfHJW24X4C31S9l1ggwjQ s+Rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dlf60vemIdHmfzctuTpTBAImPjY9E2xPjuVnwoLDTLI=; fh=ruOaVEkAbEh3t4sLFZXGQmBwM4c1/V/LLnMggyZGb4c=; b=bjItbgkwhy9QHY5AY7lSlk+ZL90jL0UE4ceINMVyXOvsv4GQ4SV9px9NKCMwb8fUR7 UqyCJow+6jN125T5HgzTPBGgNqry4vljB3lgx+4ddvYIHHhR+jyjWKJ2mN5XSkfLobWP lp7F4HKvXEa4XFradSDxbt/n8Qs7gu4j8cj8Io7ADd7rdwWesjluahuG+omgmfEY1Ght rHRlxlqGl4vlFgmTESQCmb8m8ZNqcP0bTsD6sNs9dQLtFX0KFisl22JOESTcdfPRA/YQ c87IrnpIH+UXXrmt9mMT/o+WvEe96NUxv/tfuhExOvxst0AKd28kPSgIsbhE0AnCl+/T bV3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eCNCG1RB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195440-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae0fdd4fc0si15343036d6.86.2024.05.30.06.46.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 06:46:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eCNCG1RB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195440-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E45741C22101 for ; Thu, 30 May 2024 13:46:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5867E17D8BC; Thu, 30 May 2024 13:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eCNCG1RB" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 79E2E17D8B6; Thu, 30 May 2024 13:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717076767; cv=none; b=nqc57JtR2u4ONpIeA8Hf/I2iNRI/Q/9RSHAXWmMgFrzsrqpq07UTQjxjlfwzuqIqOKNSx2HwWb0kSI73Jwcpzukjb0QPvlkAxZNQbOyipPKjrpAfwjjJNkyfwfmcQKNJvzbAGAccd92uYSetULeOKDUm3ezsY20LSKaUTXGO6iY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717076767; c=relaxed/simple; bh=NawS5FIK/UBSIsMh81EVPQx6KaknSeZy9r3xaRXEbCo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iFV9OTI1iZ9Z35vjXwhLhhwUgXHYNB8A8Z9JnfYDmZhJRX2uA636hROAaFX0YfLPCUjBM0Uom9OOoYqKm4xVSzj3E3qDovls4CZRm4FCA7cv+EkNagaV4Jb5JrQ8OORjjPANpBTs+ebl8zBTFukYYdNwo2eLUvKrjBLB3oLgvnw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eCNCG1RB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76B24C4AF08; Thu, 30 May 2024 13:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717076767; bh=NawS5FIK/UBSIsMh81EVPQx6KaknSeZy9r3xaRXEbCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCNCG1RBRB339C6P4DXdUifWTwWOnIUkuqzxWs9vdt+MDCR1j/8yudpyF41aY11DV AveE2C/j3qJngHmNXlQRlyfee4Kr0Qh4HVs+yv9+xjVMwe4R5CBCHXb3/2Dd4UEQuv jBRzg5Ee2JIWLcCLHFpRnVe/1VDXNBOIgGCXcrkI3W3Wi2m1NC/CO+KqZU7m6EIlvM OAIh95d02qE950OgAJH1hN0ukumH6h6aM4sBGlmiACOD5UvuSbLIUKvdiSDkj+a6g9 3m/DiCotRFusug8UggvQNDsThJdZLe18+AZUJEE/cunjc4Se5wF3WtsC+tDExdQ1Gz lZ5vV+ie4aQ/w== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Boqun Feng , Joel Fernandes , Neeraj Upadhyay , "Paul E . McKenney" , Uladzislau Rezki , Zqiang , rcu Subject: [PATCH 02/11] rcu/nocb: Move nocb field at the end of state struct Date: Thu, 30 May 2024 15:45:43 +0200 Message-ID: <20240530134552.5467-3-frederic@kernel.org> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240530134552.5467-1-frederic@kernel.org> References: <20240530134552.5467-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit nocb_is_setup is a rarely used field, mostly on boot and CPU hotplug. It shouldn't occupy the middle of the rcu state hot fields cacheline. Move it to the end and build it conditionally while at it. More cold NOCB fields are to come. Signed-off-by: Frederic Weisbecker --- kernel/rcu/tree.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index fcf2b4aa3441..a297dc89a09c 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -411,7 +411,6 @@ struct rcu_state { arch_spinlock_t ofl_lock ____cacheline_internodealigned_in_smp; /* Synchronize offline with */ /* GP pre-initialization. */ - int nocb_is_setup; /* nocb is setup from boot */ /* synchronize_rcu() part. */ struct llist_head srs_next; /* request a GP users. */ @@ -420,6 +419,10 @@ struct rcu_state { struct sr_wait_node srs_wait_nodes[SR_NORMAL_GP_WAIT_HEAD_MAX]; struct work_struct srs_cleanup_work; atomic_t srs_cleanups_pending; /* srs inflight worker cleanups. */ + +#ifdef CONFIG_RCU_NOCB_CPU + int nocb_is_setup; /* nocb is setup from boot */ +#endif }; /* Values for rcu_state structure's gp_flags field. */ -- 2.45.1