Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3786899imm; Sun, 13 May 2018 20:17:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpRZRufbMuPcZ/UUc/vk0n4oRfZp6/fyJrTwc3DDwaqGJ4gW6LojZuN9JbXuJmRg1yHD2Sc X-Received: by 2002:a17:902:1744:: with SMTP id i62-v6mr8062456pli.267.1526267829789; Sun, 13 May 2018 20:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526267829; cv=none; d=google.com; s=arc-20160816; b=FuQjfubE7Y7OBXYLoGIKfVKZDnL12iILgAXInYhEbkklPqOPVwXtqpbckiK2vtGIjt 6b04eyqE422xHi4U/aP+ivpynErYNzf/XNr8OKnox2eKn8XV7b2pv56dyYWpQRZi4Bm+ a3H1tzn26zw2weaSLSWJNpUGKypf3YGlphLRLo08sY7qVtuwzELZeZIGlTcait/TZi2G ue9ymdgFLzay3i3npXbYkMxYZjm3wHcWgOVoYiV8u9v+mzMz4Pwl9pAy8FfwJWx+nwfd DzTPaHCaGvkxrbMn9wPCI7Sa7vpg+LIfqtC5cQPvDu6mYKvJvF+1pdTujye9l/WPZP7v l0Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=6yv/iWzTfTQkOcOFVfAbscDvKn5OpMtDSMSnWm0Gk/I=; b=h8eO2oRjpkbGDCpfUV1xFvMyNtY+KSPilN/CL3dzPH6mCSYW8A6gDCFuDAevTK01D9 FMnGXCjFulu9Jhb4rKzMoJ/ZtdKhfZihfOozJxpMs3/S7RmoxdH52xUo27YSFUhZpVV7 Mkkh93HDoFj99wvlemLK/DVqU4oW4JxbNYpm1uKY53eykWr/a8LqhdTR5rQ6zErS66c5 Av51vQaOCFoj65XJuviAUHtanr1r0j77ya7e+nKW+hv1Ka7+SOLZ6mOC6VKg135hI/vV wwMquPliA7eFwqYhOkjunUlCkjet+iahPF770/gGIE52XdU+0jN3dn7TmgzCNM0z5fU1 LDNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes-org.20150623.gappssmtp.com header.s=20150623 header.b=Ia1h0y4e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2-v6si1304962pge.624.2018.05.13.20.16.55; Sun, 13 May 2018 20:17:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes-org.20150623.gappssmtp.com header.s=20150623 header.b=Ia1h0y4e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752400AbeENDQI (ORCPT + 99 others); Sun, 13 May 2018 23:16:08 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:45439 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbeENDQG (ORCPT ); Sun, 13 May 2018 23:16:06 -0400 Received: by mail-pl0-f66.google.com with SMTP id bi12-v6so6493225plb.12 for ; Sun, 13 May 2018 20:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6yv/iWzTfTQkOcOFVfAbscDvKn5OpMtDSMSnWm0Gk/I=; b=Ia1h0y4etEHuiAxkQMyXyS5Xrs37ZN0OAKsIuXYvuZcuxzN6PEL+10XPrhuRXw25Av hr1KcRzK9m8D+GW/pPvFxFiPiomdNQb9SpsuydqRsE2G13p44eciiDjcrOAqtH3PkWd0 D0qh6BzUeKD2bPZoymDHjq4dTIpRo/2aYFBNVfaJsU8U8UZvUhLA9l1CWAZ77UW3QOtm 02ZY1gnEtUHFsqAhiiKVHqOGYUA/PgeeCs0XGx0+XuGlwJHafJgjv/yxSvFsCobJ3n7R rXbNxkCcBukjH4+/kH7HvpDOBQrddRTa+FeC5DSgcBEUcaHMR3Ft0JXMMS5vkYOsSZRZ +vCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6yv/iWzTfTQkOcOFVfAbscDvKn5OpMtDSMSnWm0Gk/I=; b=aMHxsb16tAdp1MqIl3dmJlTUh5xK1gzLHX5yC47A9gH0P5e8W47AUUsgrCD+BDyx1c MYz0xS9+9CG7c6DQgu/qFp/TzQJgjg/2z0oUficJi2So7JWqXHVl9RKPGFNBkTPHyJId KtK16Y6CmkNBiNLu3rvyspvPtnwDT6jaDKKBScXneoq5Jo909jOaH3ZmuLLaWfuRuxRd sKrIrejWd/szoeDC0AcqgflI/ld8cQ7wWLd/DDl7T+srl625xrWGa1D7Gdm6qKRtUfwk qU0lwthHUyrBmTdfTGjlHB2piOcZsF8Xbd1dSRH1OSIkadHAJFmdXU+5prWMn/ySEKhT 4t8w== X-Gm-Message-State: ALKqPwdKbzuDGnDvvHHw28A6ZNVANJoQooBQ8/+EraO3vWzTQGw4yj+f WLUTVmekfddgqMoUtTa0P+Cfw6DGMkM= X-Received: by 2002:a17:902:bd84:: with SMTP id q4-v6mr8104742pls.254.1526267766159; Sun, 13 May 2018 20:16:06 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id u14-v6sm19265635pfa.101.2018.05.13.20.16.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 May 2018 20:16:05 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , "Paul E. McKenney" , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , byungchul.park@lge.com, kernel-team@android.com Subject: [PATCH RFC 8/8] rcu: Fix cpustart tracepoint gp_seq number Date: Sun, 13 May 2018 20:15:41 -0700 Message-Id: <20180514031541.67247-9-joel@joelfernandes.org> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180514031541.67247-1-joel@joelfernandes.org> References: <20180514031541.67247-1-joel@joelfernandes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cpustart shows a stale gp_seq. This is because rdp->gp_seq is updated only at the end of the __note_gp_changes function. For this reason, use rnp->gp_seq instead. I believe we can't update rdp->gp_seq too early so lets just use the gp_seq from rnp instead. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 25c44328d071..58d2b68f8b98 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1807,7 +1807,7 @@ static bool __note_gp_changes(struct rcu_state *rsp, struct rcu_node *rnp, * set up to detect a quiescent state, otherwise don't * go looking for one. */ - trace_rcu_grace_period(rsp->name, rdp->gp_seq, TPS("cpustart")); + trace_rcu_grace_period(rsp->name, rnp->gp_seq, TPS("cpustart")); need_gp = !!(rnp->qsmask & rdp->grpmask); rdp->cpu_no_qs.b.norm = need_gp; rdp->rcu_qs_ctr_snap = __this_cpu_read(rcu_dynticks.rcu_qs_ctr); -- 2.17.0.441.gb46fe60e1d-goog