Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1361029lql; Tue, 12 Mar 2024 15:05:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9WC0wMwfAoEXc0HJh//7oYLjd/3hYmOO6NlgiIC3DBv0oeeS+QreU3+CCFa2GyiE2IMWF5TKiMMnJjSZAI1C2CsR68ol8VwuJJLyDwQ== X-Google-Smtp-Source: AGHT+IEvwPhHkRflI3SS54+FjROOyW/G/RCD21mdvTKEke3tkk7wDcT3r1Y6BM22jSzJq6cTt2Ax X-Received: by 2002:a17:902:c405:b0:1dd:76f0:3dde with SMTP id k5-20020a170902c40500b001dd76f03ddemr12125993plk.31.1710281126351; Tue, 12 Mar 2024 15:05:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710281126; cv=pass; d=google.com; s=arc-20160816; b=sMlx8iU+9GPamRAfgzbOLv1K/RFMcJhKqYgpAktZkthTHntTPoC5nhTC8wpHnJaKsX cEUcw3qoMqYdw4fgZrPs4gJpnin5BB1SQxeNNY7SV5tXnzKZPjg8xVZtTr7RvKkb/31o A0CYG0erUH3Ts/m96NFmaEh2FMRUclRbKuyxcwuafmlqZQVUZmwuZEY0AesZicc0qat6 cxZKoXr749JqWobyd4FBs41bY2UI59zgBa4SwGGLTbbtvriKeKfrQ2Pp0U0uygaoI3Cj t0tL1s5+9gVC6kzftSQRHfAZ89SsEfDp1PoVFAHGiNhlh90JI13j5ljBxmytJx+rA4rN Eyyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=3jNXYm0mjH4yD87LpRfrgobSvw20Ma30NEyevIvV1Fo=; fh=WCLPHHe9biV/2Xz3UvWPS48CcQrIiFvdTYcyjizavVU=; b=WsGkjVaPUaSSVJei/OWV/FWFKB42arPl1F0xtHeh40lfbfqkmbfQW6BaaBCxsdisPD K1JndqewNlHaaiLb8y13dRTlXwvAdiNW/TwFcyFWeyI5qQ/R/NHBocsZMvS2Vr3knite ihPg/QkEijCJXXYGF+FjiMu0ga+fKSJnOwru27YKLx+qPEnU+M1pps9aHWSEYrChPbOr sG4DZQAitdLYm5oj3lirRyBAtuv5eRlzpSCsGtsnHJ4ORVDXHKhre76MNQ7n7EHEqh2g z5RG+i02VTH7mtNiBIhF5HOoMO95prxUCJ2RN2foW+HGcWi079lufFLZDImecQhAqRZT 6N2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xu+JHrZg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id kd6-20020a17090313c600b001dda41fceb3si4193475plb.531.2024.03.12.15.05.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 15:05:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xu+JHrZg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100850-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DCFEE2813B7 for ; Tue, 12 Mar 2024 22:05:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDA68143C52; Tue, 12 Mar 2024 22:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Xu+JHrZg" 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 DE152143732; Tue, 12 Mar 2024 22:05:22 +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=1710281123; cv=none; b=ksg5w1PebgIXv3bXjGqiJ0Dymomrgo3ZqkDCOngoUKKD+PyxTVfy1Y5xUm99/2YNUnfCUnEyZX9QJXbJohgx9ZK4MjM4/w2wg7jALNRkufTLCUSDvePlQ4akzdseV0uGwV9u9Ak3FQowfZ10cRy55XKJp2BrPrHiJU0SlIrFJ78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710281123; c=relaxed/simple; bh=94kWIXOlJLd1i+GSg4nJJloy882bkGtnVNLjrkLGM18=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FalcyHg+fHjH0Qq4XhJHyEjsTcs1ZrElZAGeV4x5oslAvzbJ/zFBcDe6XMWzknuDXRcW2Uks/mUML3G8KTMfO/T1GHjgv19EdwE+PEir3i/ONrgjss81yrlmX7Vscf/DtY9NNG0bCDXkNqC9U9LRwaaPzeJlvk5/pbM0731PPVI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Xu+JHrZg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61FBEC433C7; Tue, 12 Mar 2024 22:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710281122; bh=94kWIXOlJLd1i+GSg4nJJloy882bkGtnVNLjrkLGM18=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Xu+JHrZgO69R3xfqZKPbwMT5uA3/IweYZZRxuLz671QG//X6BPeei5WY3mhDZhcRF aN4b9lBFmD/Ady/xPFDzS6/T8tsDWjaWN7kaJeFxGvrezQWVjBPrKo/CtttJXZHtJ/ P7BZJ3medWlBguplCEj8ATnGDZ5pldIeVOxCCrPZ66pyN1qABdk5ayO/lvQKHA3S/8 JeMvCg8ymM7iVzXUbD296FhIoRg4DCcTQyhzoevUhvtOQTYCTtoUhRRRk28laqkMPE nYqOhRFIUr5G+R8tyCPcaAQ935J2k3QuNonwKcUi2btJY8SiUs2aWf0Cwjk6guTrW4 iTNmBjKolcuEA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 051A6CE098C; Tue, 12 Mar 2024 15:05:22 -0700 (PDT) Date: Tue, 12 Mar 2024 15:05:22 -0700 From: "Paul E. McKenney" To: Zqiang Cc: frederic@kernel.org, neeraj.upadhyay@kernel.org, joel@joelfernandes.org, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu-tasks: Remove unnecessary lazy_jiffies in call_rcu_tasks_generic_timer() Message-ID: Reply-To: paulmck@kernel.org References: <20240312113524.7654-1-qiang.zhang1211@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240312113524.7654-1-qiang.zhang1211@gmail.com> On Tue, Mar 12, 2024 at 07:35:24PM +0800, Zqiang wrote: > The rcu_tasks_percpu structure's->lazy_timer is queued only when > the rcu_tasks structure's->lazy_jiffies is not equal to zero in > call_rcu_tasks_generic(), if the lazy_timer callback is invoked, > that means the lazy_jiffes is not equal to zero, this commit > therefore remove lazy_jiffies check in call_rcu_tasks_generic_timer(). > > Signed-off-by: Zqiang > --- > kernel/rcu/tasks.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h > index b1254cf3c210..439e0b9a2656 100644 > --- a/kernel/rcu/tasks.h > +++ b/kernel/rcu/tasks.h > @@ -299,7 +299,7 @@ static void call_rcu_tasks_generic_timer(struct timer_list *tlp) > > rtp = rtpcp->rtpp; > raw_spin_lock_irqsave_rcu_node(rtpcp, flags); > - if (!rcu_segcblist_empty(&rtpcp->cblist) && rtp->lazy_jiffies) { > + if (!rcu_segcblist_empty(&rtpcp->cblist)) { Good eyes! But did you test with something like a WARN_ON_ONCE(rtp->lazy_jiffies)? Thanx, Paul > if (!rtpcp->urgent_gp) > rtpcp->urgent_gp = 1; > needwake = true; > -- > 2.17.1 >