Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2359696ybg; Thu, 30 Jul 2020 18:36:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypULlK3ucVOpGCX9w6QCJ+W5sPUFbo+GcqutLN+DHoyrUcWEN80Z17jF49FGEGRihPa3RQ X-Received: by 2002:a17:906:54d3:: with SMTP id c19mr1907196ejp.408.1596159403137; Thu, 30 Jul 2020 18:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596159403; cv=none; d=google.com; s=arc-20160816; b=LPT/nd8dJcKgQqk9hZMDGZ+poXIB4ZYEkk56xSQGgzjmSlKtVXIRrCbXtpyxS3efB5 WS6alOBVfoX1+r/5XFEVFXnwAfzJP9RuyYsMRWk/8n/CRPSO+tXCyA8yy8afkRZ38d1n qSfsfnvMjbN4R84Sz1zQcoY56d4feCJJTIAohpWOtVwiTh/+lIa4e09D3XtACpnsEXRt EcsGlUEVMDvy8FKATXiLKd5FzPILuVk0VKbpuIi/W7XU7S1S2ArFVu93qECC7n/i8JzX jClaKuYKwiDsnNTb3E1lbI5ZL8U3RjS2tPFMHFW4IPPc4zDrQlTdyokgbc3/g7ZHbA83 Mh+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=g2Tndz1T7fmTFp3w2kPtHlf4QrifqAYYdIUu8dfECfM=; b=sNiJHt52QRJ2dN5tCaHX28mkw+OKS8bMNRom46apgLwu7GbAJsCm0IyKGxglVGwoZx N9WGI2qFUEZjDC9N0+dNxxUjThcfHXyyGf/XcARfCSJJgaMd9+/sR/MFjFKH+Wf5ZHoX 6l0gHkRr/xIMk8v7dbKaO6VZqM22MWsdxNJ9VCDJRwwgTH/qhsZ5gem/91uDJICoVlgA 0oMVqW1Y4qYOKhI0l6Ificca0qSvysAlfOzKj6x83WQFPo6FdOnNr6uyBuQsWjx4+GiB SH/PWoTTOnbyhX9BLHXtBIwkoF9pn7Qv3/nUh35Ayyf3Ptz86jY0lwXOUqo/uNmSh/0e WIJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kEyq63J0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i18si514590ejy.434.2020.07.30.18.36.18; Thu, 30 Jul 2020 18:36:43 -0700 (PDT) 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=@kernel.org header.s=default header.b=kEyq63J0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731006AbgGaBgI (ORCPT + 99 others); Thu, 30 Jul 2020 21:36:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:57394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728080AbgGaBgH (ORCPT ); Thu, 30 Jul 2020 21:36:07 -0400 Received: from paulmck-ThinkPad-P72.home (unknown [50.45.173.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6136620663; Fri, 31 Jul 2020 01:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596159367; bh=g1quuKAY02DWMAdeKKN9Yi71IxJiJ9RAEH+eVpo4FxA=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=kEyq63J0eBsHXUOGldm3VfPkGfglpd3hp+3+xq/gvbXoG+f4cqozrFP5o79K6NtV2 DR8BtTr158viU8thoqFDv7VhU7bTLAX36ZS97A6Bwcz0rYo2dKugWSkv7GDHuGFMG0 rkt/u4jT91oaTrvux4PhAOJRkGChiSV7zFiAanJA= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 3EBC63521361; Thu, 30 Jul 2020 18:36:07 -0700 (PDT) Date: Thu, 30 Jul 2020 18:36:07 -0700 From: "Paul E. McKenney" To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , Neeraj Upadhyay , rcu@vger.kernel.org, Steven Rostedt Subject: Re: [PATCH v2 3/3] rcu/tree: Make FQS complaining about offline CPU more aggressive Message-ID: <20200731013607.GH9247@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200731004012.2324147-1-joel@joelfernandes.org> <20200731004012.2324147-3-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200731004012.2324147-3-joel@joelfernandes.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 08:40:12PM -0400, Joel Fernandes (Google) wrote: > Make FQS loop consider it an immediate failure if the case of an offline CPU > reporting QS is detected, instead of a full second. > > This is because rcu_report_dead() already reports quiescent states and > updates ->qsmaskinitnext under node lock. > > Light testing with TREE03 and hotplug shows no warnings. > > Convert the warning as well to WARN_ON_ONCE() to reduce log spam. I will give you a chance to upgrade the above on your V3. And the comment below. I do very much like the change to WARN_ON_ONCE(), by the way! Thanx, Paul > Signed-off-by: Joel Fernandes (Google) > --- > kernel/rcu/tree.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index a621932cc385..39bdd744ba97 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -1208,13 +1208,15 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp) > return 1; > } > > - /* If waiting too long on an offline CPU, complain. */ > - if (!(rdp->grpmask & rcu_rnp_online_cpus(rnp)) && > - time_after(jiffies, rcu_state.gp_start + HZ)) { > + /* > + * Complain if an offline CPU by RCU's books has not reported QS. Node > + * lock is held ensuring offlining does not race here. > + */ > + if (!(rdp->grpmask & rcu_rnp_online_cpus(rnp))) { > bool onl; > struct rcu_node *rnp1; > > - WARN_ON(1); /* Offline CPUs are supposed to report QS! */ > + WARN_ON_ONCE(1); /* Offline CPUs are supposed to report QS! */ > pr_info("%s: grp: %d-%d level: %d ->gp_seq %ld ->completedqs %ld\n", > __func__, rnp->grplo, rnp->grphi, rnp->level, > (long)rnp->gp_seq, (long)rnp->completedqs); > -- > 2.28.0.163.g6104cc2f0b6-goog >