Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2455810pxk; Mon, 14 Sep 2020 13:59:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd6VY8s3fG3g2ESEq/w/SAXNKjvYTMmG/Qpmxh66NxX290alsGrgj6OXnT5PPcpMg2Np08 X-Received: by 2002:a50:b946:: with SMTP id m64mr19582759ede.92.1600117149605; Mon, 14 Sep 2020 13:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600117149; cv=none; d=google.com; s=arc-20160816; b=rl5qZh903r4PpkMxOL48LumcACw/Hv0Xy7TppDJYl8+lJXGqfp3sp8jIShz6OEnxMv bOVTAFsc6eKh/Op2yqtp5+Nu//Roo47NbgdKeWyGk1y28tlAHc6IegahvBhnnqKB0vS3 0/5/H0Ft7IXQPvK1tMrWQiq1k3fJW6nG6kNyC7d48NfH7SVkTS1X2Ej+1jbj3b3PyF4l 1CZ5dEPKpIB0/q97Ty25Eo551jhcfu4GDdRiJKb+XsrsQx0gTCnE1xqhZ7qWshENYDgi 3VSHCt5vNlcn5qPoztZVUoe618NVVl64xzTj53YH6eCE9xmjBIAV68NMJl1gZxQelxII ogSg== 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=oh4OmjQufKLfaAar60YJpgeKmRY84Ggbe6vVIn/L++I=; b=f50cuL++D3rUsP5u6xfxLoVKqE3H46TKrVEj1A3wIzeqpP8gDgRx4wkMAF18QLnvB7 9mepX/BWwdDySo2XThI17C2BWBXe2+O473adjiQ7kOXPjmihE9/7gyrQcRv5bC1M3mZw eabC2ini6R8d/2GQPy6BJM4b0I7jGToBNydaEmRarTxrTJsYTrUMPX6+5R3Xi7vq6UAE 4BavSvgS0kBE6hcFWAe/nV8fDpZ3fTnAyF7vexbTE8MIEYVXhNAL9PBaQ6euttqLTt9g GI9jlOCeN7kL5DGC6J6kBod5Ais6XPbTUWMP78frS86hjoCdOiITAMS/0ML3nWuXOdDR FPIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rUX3bhtc; 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 r26si8976084eda.569.2020.09.14.13.58.46; Mon, 14 Sep 2020 13:59:09 -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=rUX3bhtc; 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 S1726128AbgINU4q (ORCPT + 99 others); Mon, 14 Sep 2020 16:56:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:55618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbgINU4m (ORCPT ); Mon, 14 Sep 2020 16:56:42 -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 3F09B2193E; Mon, 14 Sep 2020 20:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600117002; bh=91ZQHPpXzVYPM1kY5tNaht13UGMxQL4Ref/OgbCg9h0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=rUX3bhtctscjf/GF6iRwny6FU/Y4zB+mOFYpGbV8pOvplCLWDQp72DCUpp9qXhbdn q/ifxj3kSWyHz9Bkuj9N3OhbFnwqFzY2jpeazQ9CbvkwhIcsGBmlus5ZQzQqvci3IV +3DkM4GJNK7HvJx5ACofl3KIgHk4JvqEiEP1lpbI= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 146F53522718; Mon, 14 Sep 2020 13:56:42 -0700 (PDT) Date: Mon, 14 Sep 2020 13:56:42 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: "Zhang, Qiang" , Uladzislau Rezki , "josh@joshtriplett.org" , "rostedt@goodmis.org" , "mathieu.desnoyers@efficios.com" , Lai Jiangshan , "rcu@vger.kernel.org" , LKML Subject: Re: RCU: Question on force_qs_rnp Message-ID: <20200914205642.GE29330@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200914194208.GA2579423@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200914194208.GA2579423@google.com> 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 Mon, Sep 14, 2020 at 03:42:08PM -0400, Joel Fernandes wrote: > On Mon, Sep 14, 2020 at 07:55:18AM +0000, Zhang, Qiang wrote: > > Hello Paul > > > > I have some questions for you . > > in force_qs_rnp func , if "f(rdp)" func return true we will call rcu_report_qs_rnp func > > report a quiescent state for this rnp node, and clear grpmask form rnp->qsmask. > > after that , can we make a check for this rnp->qsmask, if rnp->qsmask == 0, > > we will check blocked readers in this rnp node, instead of jumping directly to the next node . > > Could you clarify what good is this going to do? What problem are you trying to > address? > > You could have a task that is blocked in an RCU leaf node, but the > force_qs_rnp() decided to call rcu_report_qs_rnp(). This is perfectly Ok. The > CPU could be dyntick-idle and a quiescent state is reported. However, the GP > must not end and the rcu leaf node should still be present in its parent > intermediate nodes ->qsmask. In this case, the ->qsmask == 0 does not have > any relevance. > > Or am I missing the point of the question? Hello, Qiang, Another way of making Joel's point is to say that the additional check you are asking for is already being done, but by rcu_report_qs_rnp(). Thanx, Paul