Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3926071rdg; Wed, 18 Oct 2023 09:41:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8VV1osVdrN1pdA73xP1pvPiNjaDkClklrurnJR+ppETZkQW+AKzLJ/T9m97MJ22cEKYMV X-Received: by 2002:a05:6a20:9153:b0:14b:8b82:867f with SMTP id x19-20020a056a20915300b0014b8b82867fmr6196424pzc.50.1697647317157; Wed, 18 Oct 2023 09:41:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697647317; cv=none; d=google.com; s=arc-20160816; b=ZbjmLugrfvdDk33vmAbuD4ncyCSMtC9GNBUMJzMxiZum+r+xUgHz+N4dyC33igrZ9+ PTs0pDSxZhIpSZ5cvWkvvPHaJnGrC8hoqbmQhmYDPFcvAAYwhuljAfO3x4g5T2JHlkyy JvsND+5+5mUX4KbqHGyxAKYaQwSTmYVUkY3hg7VDT7gm/MsGGKFW/AIozL3xHaDGC+kj A09kmHi3VyK2qM4q/dG1SNCL8DL5y1TSkvb+CMvv3teBTRWN7Rejs7jbgznIpW1xKjpZ lGuX/+9TRF4DWuXeImVahgQJejJ6UedLKvhxdT3Oe9TSiBNfHw6VWOFZRmrAB4RUTV+L f/qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FuxCk53T1aRKJ+PJlZLWthu9g+UHhVdxI9dPyZ4wZOg=; fh=dPq9HigiK8a77yEZfwoDDvL5QcOmMYHmvFe4hHEMsmw=; b=Vjn/3YJCrnwJoIpUtOK3/Y3Qc090GLqLQ863ToXt5Ypp7YdNY5oxjUv7j4/NUhjHfP kWzxsfWiRtzzwGNnLkvj4xC3TZHXxnSO3VVr3H7c6C/R+WSKvcmPdgfV7hbHtAzcLcU1 xPzO0UAdE+fyYAXaagXGFtb9OW11nSC0j1URggAOkDbTld6SMG4xTvptrVjFfSTV5Yde cRF16DtZ6+fH86dYJHRQ+PRG8+YGPw37H5z8A0CeazNSrwMQ/vcThSmVW73JuW0m/lQZ hcYnFj7Wllzz5GD9AVfL/4ZEEg0wcttbxlRJa3Qp7NuP4YcW/YoebCe2iFVqWSeKkrJp q3Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="AHzaqe//"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w67-20020a636246000000b005ac08e723f0si2562331pgb.10.2023.10.18.09.41.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:41:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="AHzaqe//"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 05DE2816692E; Wed, 18 Oct 2023 09:41:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230368AbjJRQlx (ORCPT + 99 others); Wed, 18 Oct 2023 12:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbjJRQlv (ORCPT ); Wed, 18 Oct 2023 12:41:51 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FD17EA for ; Wed, 18 Oct 2023 09:41:49 -0700 (PDT) Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39IGc3Tl031767; Wed, 18 Oct 2023 16:41:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=FuxCk53T1aRKJ+PJlZLWthu9g+UHhVdxI9dPyZ4wZOg=; b=AHzaqe//s9jn48AnGT+IFQ9JLkl380/H9k8Xs6LUwWhCtAkhgZ/zxWjybh9J/z1j9Yly vwH9/Dkq2lN7fFtJ1Wni2w4/xuh92Zcl7BgAXlvz7/IgG8WapTJG1WV9PL6nohAResKf aOAvNuvxKLa3kSKr8L/ynyLNryeAuey5aWLXq4ma6nbnxncM8vaJ7/AC1NqGKza1iHHM E9X8+gEKBQdB7mm26jJiVm5pL+h2f5yJq9w1OMSGyJPBnduYv0uKeQYEhpJI4cwuYW4z dCQJ6LEFUhG9U4nXXgqoe4hT/T8SX80tszeEC3ZPrIslN77aZqMBxggjrJVmxLa4xdzy BA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ttjn4147w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 16:41:34 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 39IGc9TP032204; Wed, 18 Oct 2023 16:40:17 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ttjn40x6v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 16:40:15 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 39IEj7aq012876; Wed, 18 Oct 2023 16:38:27 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3tr5pyj7gp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 16:38:27 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 39IGcPAZ18350662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Oct 2023 16:38:25 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 01C9F20049; Wed, 18 Oct 2023 16:38:25 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3140F20040; Wed, 18 Oct 2023 16:38:22 +0000 (GMT) Received: from sapthagiri.in.ibm.com (unknown [9.43.47.66]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 18 Oct 2023 16:38:21 +0000 (GMT) From: Srikar Dronamraju To: Michael Ellerman Cc: linuxppc-dev , Srikar Dronamraju , Christophe Leroy , Nicholas Piggin , Peter Zijlstra , Rohan McLure , Valentin Schneider , Josh Poimboeuf , "ndesaulniers@google.com" , Mark Rutland , linux-kernel@vger.kernel.org Subject: [PATCH v2 5/6] powerpc/smp: Add read_mostly attribute Date: Wed, 18 Oct 2023 22:07:45 +0530 Message-ID: <20231018163751.2423181-6-srikar@linux.vnet.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231018163751.2423181-1-srikar@linux.vnet.ibm.com> References: <20231018163751.2423181-1-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: aEAxBG_TAP_K-fj3Z0VDeCVz5gkG5Slc X-Proofpoint-GUID: SYibiaOliV8cKZtevOTiW_ap_E5nL3tY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-18_15,2023-10-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310180135 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 09:41:56 -0700 (PDT) There are some variables that are only updated at boot time. So add read_mostly attribute to such variables Signed-off-by: Srikar Dronamraju --- arch/powerpc/kernel/smp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 29da9262cb17..b1eb11a66902 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -77,10 +77,10 @@ static DEFINE_PER_CPU(int, cpu_state) = { 0 }; #endif struct task_struct *secondary_current; -bool has_big_cores; -bool coregroup_enabled; -bool thread_group_shares_l2; -bool thread_group_shares_l3; +bool has_big_cores __read_mostly; +bool coregroup_enabled __read_mostly; +bool thread_group_shares_l2 __read_mostly; +bool thread_group_shares_l3 __read_mostly; DEFINE_PER_CPU(cpumask_var_t, cpu_sibling_map); DEFINE_PER_CPU(cpumask_var_t, cpu_smallcore_map); @@ -987,7 +987,7 @@ static int __init init_thread_group_cache_map(int cpu, int cache_property) return 0; } -static bool shared_caches; +static bool shared_caches __read_mostly; DEFINE_STATIC_KEY_FALSE(powerpc_asym_packing); #ifdef CONFIG_SCHED_SMT -- 2.31.1