Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp91112pxb; Tue, 12 Jan 2021 21:13:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHuM+qXoiR4cYWFP1QwHLortBgKDqVyn64WG4Id77Ajc2uhGJUDClpXtKFtBSFYvhdDq1e X-Received: by 2002:a17:907:2138:: with SMTP id qo24mr271939ejb.425.1610514805337; Tue, 12 Jan 2021 21:13:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610514805; cv=none; d=google.com; s=arc-20160816; b=XV07Egw6jairCdrRb80aOZIbQ5wXzcC2b4E9IvK3Ux2wijJ95TiWkmy6hOhFjI9Njt /LKzeKZrVG/JX5DNImvq4c1amTiBL6sMQMIkrBO23WEIyj+jE1QspCZGwtjOUEwXHyOz nCtN2SXapicgWVIb9FjBAIsG+fkstyebIBvMGqiNn2WJfr/Jg3deOFfMeCo6uAAV5D0d xArKYfN0BbqTdRi53UcNRve+A0LnFnzFB2ylAfQlJwNYsB2/Lsqy5+3zpwA2KeyKCcRU qmNZODaB4pYGTbwUuQrLBV0PA43BUs3bXUu3G0atba4foOFj/jhbGbH5irGK8q8ZTAye XBbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dmarc-filter:sender:dkim-signature; bh=lz1rbHEN8q40hJaefWgl9UylDcfTHqHw9eJZzyNgRG0=; b=HpXLMu+33Y4vSNBu+objhFHdpUn800SnTNLwLr4SZnkGrQHc5pTnh/JUzlSwc2DAmd PyF3giBdaMgfhaDRvHqP+Q16P65B0zvVb+yFjiZqkMWvkf2kwCb3M3HsfqL/hjhlWWpy ySXBMaHoEssE7UejhaHVMAWKMxlBwnw4BOuI+xDwO047aPQmFM4bURQZGQx19ae5F8bP zx20VzSJhK+CR04CjKn92LGFY0dEPM5adtLYJF9+cTY31gZqHTdoZny5fZoR0t3x8Jo2 yfKseT/1hntCtuU8EPKCRjfLn/UX0CtMPE2AJxRB46gEh4n54PufRrMV8NZLybVl3Tft s4xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=iPWkC+sx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id os13si213117ejb.680.2021.01.12.21.13.01; Tue, 12 Jan 2021 21:13:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=iPWkC+sx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725770AbhAMFMe (ORCPT + 99 others); Wed, 13 Jan 2021 00:12:34 -0500 Received: from so254-31.mailgun.net ([198.61.254.31]:22812 "EHLO so254-31.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725773AbhAMFMb (ORCPT ); Wed, 13 Jan 2021 00:12:31 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1610514727; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=lz1rbHEN8q40hJaefWgl9UylDcfTHqHw9eJZzyNgRG0=; b=iPWkC+sx2uN6C1YATa2Icf6dOad2S86F68Ocd0A7JNCQBk4AFfc9RW7Z8rhjzDnGwC3sEijv wyaGc5dKGZLFJK13LUTVbdaoBN0NZvTqFRQ7t66FVniJgYUgaYA15Up6cLN2ehnlQtKI0DVW /bweg1gW1tGgXUcpndYzGf0DNxg= X-Mailgun-Sending-Ip: 198.61.254.31 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n09.prod.us-west-2.postgun.com with SMTP id 5ffe80ffd84bad3547d26847 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 13 Jan 2021 05:11:27 GMT Sender: neeraju=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 95DB5C43465; Wed, 13 Jan 2021 05:11:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.0.103] (unknown [49.206.37.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: neeraju) by smtp.codeaurora.org (Postfix) with ESMTPSA id 881FEC433CA; Wed, 13 Jan 2021 05:11:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 881FEC433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=neeraju@codeaurora.org Subject: Re: [PATCH] rcu: Correct cpu offline trace in rcutree_dying_cpu To: paulmck@kernel.org Cc: josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, joel@joelfernandes.org, rcu@vger.kernel.org, linux-kernel@vger.kernel.org References: <1610365558-8330-1-git-send-email-neeraju@codeaurora.org> <20210112173116.GG2743@paulmck-ThinkPad-P72> From: Neeraj Upadhyay Message-ID: Date: Wed, 13 Jan 2021 10:41:20 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20210112173116.GG2743@paulmck-ThinkPad-P72> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/12/2021 11:01 PM, Paul E. McKenney wrote: > On Mon, Jan 11, 2021 at 05:15:58PM +0530, Neeraj Upadhyay wrote: >> Correctly trace whether the outgoing cpu blocks current gp in >> rcutree_dying_cpu(). >> >> Signed-off-by: Neeraj Upadhyay > > Good catch, queued, thank you! Please see below for my usual > wordsmithing, and please lat me know if I messed something up. > > Thanx, Paul > Thanks Paul, looks good! Thanks Neeraj > ------------------------------------------------------------------------ > > commit ab6e7609e7590e1bb220ef6b0822a823dde46f6c > Author: Neeraj Upadhyay > Date: Mon Jan 11 17:15:58 2021 +0530 > > rcu: Fix CPU-offline trace in rcutree_dying_cpu > > The condition in the trace_rcu_grace_period() in rcutree_dying_cpu() is > backwards, so that it uses the string "cpuofl" when the offline CPU is > blocking the current grace period and "cpuofl-bgp" otherwise. Given that > the "-bgp" stands for "blocking grace period", this is at best misleading. > This commit therefore switches these strings in order to correctly trace > whether the outgoing cpu blocks the current grace period. > > Signed-off-by: Neeraj Upadhyay > Signed-off-by: Paul E. McKenney > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index cc6b6fc..63c6dba 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -2387,7 +2387,7 @@ int rcutree_dying_cpu(unsigned int cpu) > > blkd = !!(rnp->qsmask & rdp->grpmask); > trace_rcu_grace_period(rcu_state.name, READ_ONCE(rnp->gp_seq), > - blkd ? TPS("cpuofl") : TPS("cpuofl-bgp")); > + blkd ? TPS("cpuofl-bgp") : TPS("cpuofl")); > return 0; > } > > -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation