Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp400729lqh; Tue, 7 May 2024 02:42:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPQ9gL45QKaMAdy4PRPAV4GAZN4yLVtM5/Mlnb89mdp/JsGmIBWWNB8xi7ToZ6aWqAOI5MwCkEOGni0KVANNm5BgCGsqjD3phWxRAUeg== X-Google-Smtp-Source: AGHT+IHZy1WvXoJ+cPI/K3tEMc4Ot6kRh2a8jrQE5Cuzdnk7VPJOunEjZVjGh1PbW0rVMEvqUhUz X-Received: by 2002:a05:622a:60c:b0:43a:a255:cf3 with SMTP id z12-20020a05622a060c00b0043aa2550cf3mr15781271qta.63.1715074949798; Tue, 07 May 2024 02:42:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715074949; cv=pass; d=google.com; s=arc-20160816; b=loHErhrlVAaveg00orgJ1a/skjqhoc/HOGPkIQ+AkG/5qjRDlybjY3GjEzleav0TpZ y6FXuWc1OvAjy6k1F9SOIdMFO4pSLnJ65DNkzT47IFseV76+hfGcrb2yAnuMumZTyj5Q BGLJhmTRh6yXmxUHtEAf4bd8mFnXTBxj9Y4psr+mu0WY9E2zpwR/eGEglwWqamTM2fwZ sWxZNF+99H/wBtcn2B5L9lhVxDiiOapT9d5dTznfThWp2bFQMrDto/qw5bImP/iPWZjp NmyvSUOgt4c+/GZkDJC07QI3eJdSImk4FIGZ41OSS9go1GXggJ0lQ8wY2QRky6lc7v00 TXQg== 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=PfH9K/eXzjwreUAemmntcMfIwoR9Zl46+OauXvPYO0k=; fh=uTb7TY6Ueyd9kF6rn+EFQWEQpEGEMi9Dpm7fIVan5Zc=; b=aSbxm3vzLVOKBs9a4u5Ue2anTLYH+ntwIE+euO2FxDRnEbMXm5gkM5PuWE/qxnstHL Dvwg9dvqb/WY9FFpq44v/XP6MEyIc2ke0N2kX+Yw+F2ke4hrUn5puSvblrdNVMasdq6w PxgpZS2B3O7Lo3d90Ho5NLZPm/1fpnZrmULhrTAuwNfOdIOvZFNBjma7iMbOwX8WPmqX 3FWKironA7360gPNz1I06V8JBGpxXqnH1VFdiN1nN7B8sljIBWVOb22wHVH7aQAMQjj3 wCE2w+VZ0oTIy9cLdz10qF4wz7WihM7q49O+lXdoEq5Ig3dnwPM2m5LqdlsZej/x5OxS DMBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mDdmL3aq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-170987-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id dj12-20020a05622a4e8c00b00439ac788934si10357303qtb.754.2024.05.07.02.42.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:42:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170987-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=@gmail.com header.s=20230601 header.b=mDdmL3aq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-170987-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EADA11C2354F for ; Tue, 7 May 2024 09:42:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 018DD15F416; Tue, 7 May 2024 09:36:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mDdmL3aq" Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C58D15ECCC; Tue, 7 May 2024 09:35:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074564; cv=none; b=At1I2yLQk8QLXMhnn97+EqCeu5l+uVN0WNoAOIz9V2ljXVxJherWJ559JTek5j4ATy8+Ow/l/TO+psY81rLIrRurV3mSJF54xI4OXfFTP9+mt+x+yApmqKpQAb2tnOPr6ta4st3poeDAXzuShVo2mcqe2/fffu9Hat5VYl1hgoU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074564; c=relaxed/simple; bh=EWsVRIZxGPSXoY2Njx9/Sp9Wsqp8UVQL2ck7eZ/1txM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=P1YxwSukEcxJ0vS8P/tcudPtj79rKw3KbVa3E0xw8caUqMsqpT8RSw6Y7jRso94gh3HQZxkSzMqt9JqHZvJcuCVJjl7NK8h2DyvJ9oIY2vyLauN6Re2Qpwj2DO6/RLJexKKMeYVM/tTm3uCUvIYkn7ZPg1u2flQEf3IIBmsukX0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mDdmL3aq; arc=none smtp.client-ip=209.85.208.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2e367c2457bso20449381fa.1; Tue, 07 May 2024 02:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715074556; x=1715679356; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PfH9K/eXzjwreUAemmntcMfIwoR9Zl46+OauXvPYO0k=; b=mDdmL3aqYgEx5+BpKsDxmxnJ7WUsS/5vaVGb4vCzgdlQmtMSbcmZMH6kgXhgNVSYx1 0T1T3O0WQQ/EvdDNxeDwMXXLY+Uywl6j1/myp71r6UFEFaZKGQiN9wRCFoFntSAebNNt wTptxJrvTH/oobxk3QhXRmYb3LXSR7YMNT+v0GY8EAd6rXpYMpFOx+FYjHh+LHSiXS+N UoeCWS/+AebRcMPudgu3olf68Q+w0kjznrdLznVFoyTb6Elfdo0gOdKDTlQ+9/K8R8M1 noQXysCa9Od7udgSQs61RrJ0u2AnR+4Y3Vw0+Ui3HTg6lLZFZPUnXLB//4vQpqnK2CK0 K6xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715074556; x=1715679356; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PfH9K/eXzjwreUAemmntcMfIwoR9Zl46+OauXvPYO0k=; b=R4f5gfiOKHdhOBCyljkJ8Whv6CVImfUaNknddI4FMEzL0Oz+KLDZQv+NTMpqaduHuZ pSHkl5UElBvosyqv+gXAaMqj1p24KgyCJCs8q2Bv6iQ4s3ruWSKfkZaCNOKT50TA4WEr vipV+lLdVpaBJJUbfJRalAhvm7ruOPAYRnh8GMaQg8dUY/+q7A8NIuh64e44aZtkt495 rSA3XVWUPY0Izsh6hIpapWgIXW/J0USorZX+9+UBHAjCF7r2d7IS5ZIeupJ+6JIdlOR1 X3c/pPmDCUhWrgJaI0KV81h3m2XQIICKafPyk/O5k67KLygYf0+Ln/lVWmuOFLa+gdvQ IOJg== X-Forwarded-Encrypted: i=1; AJvYcCWAMoruT66F1Bv4QNbBWJ1BUnMjhlxwc1GaX8BN9MWl2CW4SElZSYmH5G7GJXGGhgEvBqLBy2/PAW6S4N+6RXWIvg0pZYkjRtVj3J4K X-Gm-Message-State: AOJu0YzTKhEMca7m7c/m4xUxtW5Y3Vu22yqrZpBIh+lgCwiAxXIj+3Ka XhqVRDMi8VBaMxnkjj8raoD+xRdbiMuyxoZTRYDFRr87Tn7jViKjHTJPU4MS X-Received: by 2002:a2e:6109:0:b0:2e2:ab69:d10a with SMTP id v9-20020a2e6109000000b002e2ab69d10amr6164194ljb.39.1715074555694; Tue, 07 May 2024 02:35:55 -0700 (PDT) Received: from pc638.lan (host-185-121-47-193.sydskane.nu. [185.121.47.193]) by smtp.gmail.com with ESMTPSA id t18-20020a2e9d12000000b002e29c50c4dcsm1335473lji.27.2024.05.07.02.35.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:35:55 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: "Paul E . McKenney" Cc: RCU , Neeraj upadhyay , Boqun Feng , Hillf Danton , Joel Fernandes , LKML , Uladzislau Rezki , Oleksiy Avramchenko , Frederic Weisbecker Subject: [PATCH 24/48] rcu: Bring diagnostic read of rcu_state.gp_flags into alignment Date: Tue, 7 May 2024 11:35:06 +0200 Message-Id: <20240507093530.3043-25-urezki@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240507093530.3043-1-urezki@gmail.com> References: <20240507093530.3043-1-urezki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Paul E. McKenney" This commit adds READ_ONCE() to a lockless diagnostic read from rcu_state.gp_flags to avoid giving the compiler any chance whatsoever of confusing the diagnostic state printed. Signed-off-by: Paul E. McKenney Signed-off-by: Uladzislau Rezki (Sony) --- kernel/rcu/tree_stall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index 5d666428546b..62b2c4858028 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -579,7 +579,7 @@ static void rcu_check_gp_kthread_expired_fqs_timer(void) pr_err("%s kthread timer wakeup didn't happen for %ld jiffies! g%ld f%#x %s(%d) ->state=%#x\n", rcu_state.name, (jiffies - jiffies_fqs), (long)rcu_seq_current(&rcu_state.gp_seq), - data_race(rcu_state.gp_flags), + data_race(READ_ONCE(rcu_state.gp_flags)), // Diagnostic read gp_state_getname(RCU_GP_WAIT_FQS), RCU_GP_WAIT_FQS, data_race(READ_ONCE(gpk->__state))); pr_err("\tPossible timer handling issue on cpu=%d timer-softirq=%u\n", -- 2.39.2