Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2986712ybh; Mon, 16 Mar 2020 13:33:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vshB6DNzdyT7F4pRzA2klABmlY1UxwWZjjDc6SYaPrkXbt2OoFqSCHKOaJQEexwar64BiMD X-Received: by 2002:a9d:719a:: with SMTP id o26mr924998otj.290.1584390799357; Mon, 16 Mar 2020 13:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584390799; cv=none; d=google.com; s=arc-20160816; b=tL47qjo4vbT2sdydpzQdt1qp9tqUca1+Oc2x1WtAgCZANT0PJQ89CJbQPHYCu8eH9u vYJYDGfp+sfu3FVZw1xj+YTdclVFBJgMcmpYVD6bRgnUiDsT+ArfxVL49AUf+IQHCXBN xOmWTFD7aEqlk6ejp/YG8uFk0oDFUcvAm3L14bVB01M0MH0K38DUI1tvMr1GbvTtHIk+ vSyNnckqBphldTw3xNkltw0YMl7P7DpYzpVxbGu6YzgPZyjgqN6ewZZuJKD51jhqQAqF 0XyZfCxDabgbKa9uQsa6iUcMFchEK6eUChgRMKSFxWXlmMu+k5I/9NyjBqnTbRnsIcQB plUQ== 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=xihJj/cXUxxHMiZb30BgUb6ukpLmLg58gYMC+HLY5KQ=; b=06Mbk+G9mbZ0vl1HQgtkknRSegrrHGeVjsuZWOYocff/f2ceDcXAVymj3d65VpOgle JX0TZTdXiJ8VsW2x1KUbdiSN51ez38+fmBUqqvvrOxY9oVX/M9WvTyWTHv90r053cGwZ bOQhXj5/W2C0mBuOUr2rb0yu9PyZUmyLWG9C6ulADxgu9o3D4nElBfxpekz4rQDwjnMz 6UrcroRzMF/H4ruTjdVTsAU4RM91yOl+kVZpyeYIDfuvV04AxXZ5BEQZt1s4+LtiIpT7 xy+olMqnA42La6tFi0znnk/lshJPfikNLGwcmoE8T9J2DSPyGqT4RiUJQilOv1H5dn/K d9LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XYJPJxiP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si496872otp.96.2020.03.16.13.33.06; Mon, 16 Mar 2020 13:33:19 -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=@kernel.org header.s=default header.b=XYJPJxiP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732588AbgCPUcm (ORCPT + 99 others); Mon, 16 Mar 2020 16:32:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:56356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732486AbgCPUcm (ORCPT ); Mon, 16 Mar 2020 16:32:42 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (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 7FA4920663; Mon, 16 Mar 2020 20:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584390761; bh=nklUAC/alqRi607y+IxIxqF+82IeDZb9jP6+Nc9EVK4=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=XYJPJxiPOf9exMhHRhTNBwNosOCCwOwVwPOPPUZQkzHevXiguzDXhUxeMDS2PAlOc VMwN1W+kiT4a9kwnR5u6x8FjnfvknmRZT+Wi7o6DlwZ1Eb4dcqy6PrteY4UibOnXyp hCnAUvCrbrFpFwQpXR1sG9n0HDVDOvrO1msHwAQo= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 282D43522DE1; Mon, 16 Mar 2020 13:32:41 -0700 (PDT) Date: Mon, 16 Mar 2020 13:32:41 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: rcu , LKML , "kernel-team@fb.com," , Ingo Molnar , Lai Jiangshan , dipankar , Andrew Morton , Mathieu Desnoyers , Josh Triplett , Thomas Glexiner , Peter Zijlstra , Steven Rostedt , David Howells , Eric Dumazet , Frederic Weisbecker , Oleg Nesterov Subject: Re: [PATCH RFC tip/core/rcu 09/16] rcu-tasks: Add an RCU-tasks rude variant Message-ID: <20200316203241.GB3199@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200312181618.GA21271@paulmck-ThinkPad-P72> <20200312181702.8443-9-paulmck@kernel.org> <20200316194754.GA172196@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Mar 16, 2020 at 04:17:51PM -0400, Joel Fernandes wrote: > On Mon, Mar 16, 2020 at 3:47 PM Joel Fernandes wrote: > > > > On Thu, Mar 12, 2020 at 11:16:55AM -0700, paulmck@kernel.org wrote: > > > From: "Paul E. McKenney" > > > > > > This commit adds a "rude" variant of RCU-tasks that has as quiescent > > > states schedule(), cond_resched_tasks_rcu_qs(), userspace execution, > > > and (in theory, anyway) cond_resched(). Updates make use of IPIs and > > > force an IPI and a context switch on each online CPU. This variant > > > is useful in some situations in tracing. > > > > Would it be possible to better clarify that the "rude version" works only > > from preempt-disabled regions? Is that also true for the "non-rude" version? > > > > Also it would be good to clarify better in cover letter, how these new > > flavors relate to the existing Tasks-RCU implementation. > > > > In the existing one, a quiescent state is a task updating its context switch > > counters such that it went to sleep at least once, implying there is no > > chance it is on an about to be destroyed trampoline. > > > > However, here we are trying to determine if a task state is no longer on an > > RQ (which I gleaned from the first patch). Sounds very similar, would the > > context switch counters not help in that determination as well? If it is Ok, > > it would be good to describe in cover letter about what is exactly is a > > quiescent state and what exactly is a reader section in the cover letter, for > > both non-rude and rude version. Thanks! > > Just curious, why is the "rude" version better than SRCU? Seems the > schedule_on_each_cpu() would be much slower than SRCU especially if > there are 1000s of CPUs involved. Is there any reason that is a better > alternative? The rude version has much faster readers, and the story I hear is that there are not expected to be all that many concurrent updaters. But to get more detail, why not ask Steven why he chose not to use SRCU? (I know the story for the BPF guys, and it is because of SRCU's read-side overhead.) Thanx, Paul