Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp519818rdf; Tue, 21 Nov 2023 08:43:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeyzzFAQQrNO3zDYWJq22747Fk2eGgMHMbGr/jyLhYepnGU7fRuE9go5FgbwHrW8wDYd6u X-Received: by 2002:a17:902:a413:b0:1cc:5db8:7e92 with SMTP id p19-20020a170902a41300b001cc5db87e92mr9442354plq.58.1700585035416; Tue, 21 Nov 2023 08:43:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700585035; cv=none; d=google.com; s=arc-20160816; b=yyYg60c+MALz9foEesBDfQGMGWD9M0/qCgttrkTOAEx73x2PdrBNMKp69T8VkX+wqt nUI3bMvIQ2txzWBYbZP9WfYEEzaPSkrG2erb45QFnmSTemIvYH2VCm1nb86lanMJ0sSg QmpJciGHCPatmnNeGBiTRiqsKmAlerZ9Url8LNV7vbzoiGPd7FyQV/pZ13btUf8V9Vwo wseG+Q9FbjWA36reIIrOsZnYXTcOQlcnA2hth+fbHJ868ZXDNC4uawq7mf8KkboANDy8 CvATA8uX+5cMz20QSiKeTaeatlOglEbNMskI3iaMEZ3W2A9ZAct3gKb0X3IrAzuTUlNz Y+CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ErGbfnMxPOILAMehNZTFhusE80VbZ0jsTIDxq5n8Gjg=; fh=7WdIjnk0GNuVJ8AMOdUE55QExF/wyJClntY/rjhqc0A=; b=BK47IMT9YyENOkB5H3DvsI8N2/1FvKZsN8ESXpWRYw/ugUfAeOUp4yF0a9McTG1avo K4OMNgk0QY3NnIr4CnHwWcYdfKeHHN1uz96ttvu0dfCyEDyY+AqeA3YSFxoTrLWvVaMg 0k9nM6PauLjN8OnnYMdLgSF1JeeVuT7iHpSqgqfhSxwoRvONBM+tdsXSdQIIOYK9dTRg KT5u5rZGnLDOsBzOfJJX0RhD3MtPZPEjezH+MNGydi+h+xrAI7N8FhAw+xtWzmgpaFrm 2jNFbW0+FdzucUXKixJPO9eOcZIUjrGSntbFwtaQfUcHOLLXpg9JruEpfUqfkJWdrk3r 593Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IoHNeeUS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id j10-20020a17090276ca00b001c9d7d70d7bsi10299425plt.4.2023.11.21.08.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 08:43:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IoHNeeUS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D33D6808488E; Tue, 21 Nov 2023 08:42:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230508AbjKUQmB (ORCPT + 99 others); Tue, 21 Nov 2023 11:42:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbjKUQmA (ORCPT ); Tue, 21 Nov 2023 11:42:00 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FB9CE7 for ; Tue, 21 Nov 2023 08:41:57 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F3CDC433C8; Tue, 21 Nov 2023 16:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700584916; bh=GA5cVgxVxFnsICwvLexb6iEuW/gfAj83suuz969sIis=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=IoHNeeUSDJO1JlkHUfNVI4gvYxREiQjrTPMCpEOjyHuAF9b3xCiEVgxpmx5hSQzjs DKWF8JCjAEqAEYMYhYKj4bks9WRYWXzi53pKDF8kVDWQgS9SfovbAsrWWwIHk/xWNn h2GETJFxru8kBvRGRo/a2pAtEToSx7NjmuBMAChMQWTXpw8FE3yilI80YBWel6GXJr nGg3MZrP2GLAe9veDlXLNj1UUfSCPvlJ1vjB7kIQpIRYy0ot+srfS1J5mwbE5EpS/g hYfCGJSYJUij6I/vcbIoi6pS0FBjn5y16vaSjLmjXLIzPlsbZzFssbn+hg3GUhNaTp 5icqFEcMLJqhQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 164D8CE04C0; Tue, 21 Nov 2023 08:41:56 -0800 (PST) Date: Tue, 21 Nov 2023 08:41:56 -0800 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Mathieu Desnoyers , Steven Rostedt , Masami Hiramatsu , linux-kernel@vger.kernel.org, Michael Jeanson , Alexei Starovoitov , Yonghong Song , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , bpf@vger.kernel.org, Joel Fernandes Subject: Re: [PATCH v4 1/5] tracing: Introduce faultable tracepoints Message-ID: Reply-To: paulmck@kernel.org References: <20231120214742.GC8262@noisy.programming.kicks-ass.net> <62c6e37c-88cc-43f7-ac3f-1c14059277cc@paulmck-laptop> <20231120222311.GE8262@noisy.programming.kicks-ass.net> <20231121084706.GF8262@noisy.programming.kicks-ass.net> <20231121143647.GI8262@noisy.programming.kicks-ass.net> <6f503545-9c42-4d10-aca4-5332fd1097f3@efficios.com> <20231121144643.GJ8262@noisy.programming.kicks-ass.net> <20231121155256.GN4779@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121155256.GN4779@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 08:42:03 -0800 (PST) On Tue, Nov 21, 2023 at 04:52:56PM +0100, Peter Zijlstra wrote: > On Tue, Nov 21, 2023 at 03:46:43PM +0100, Peter Zijlstra wrote: > > > Why is this such a hard question? The place to look is here: https://docs.kernel.org/RCU/Design/Requirements/Requirements.html Or, if you prefer, Documentation/RCU/Design/Requirements/Requirements.rst. > Anyway, recapping from IRC: > > preemptible, SRCU: > counter-array based, GP advances by increasing array index > and waiting for previous index to drop to 0. > > notably, a GP can pass while a task is preempted but not within a > critical section. > > SRCU has smp_mb() in the critical sections to improve GP. https://docs.kernel.org/RCU/Design/Requirements/Requirements.html#sleepable-rcu Allows general blocking in SRCU readers, which it tolerates by giving each user its own SRCU via DEFINE_SRCU(), DEFINE_STATIC_SRCU() or a srcu_struct structure. Users blocking too much in SRCU read-side critical sections hurt only themselves. Yes, heavy-weight readers. > tasks: > waits for every task to pass schedule() > > ensures that any pieces of text rendered unreachable before, is > actually unused after. But does not wait for tasks where RCU is not watching, including the idle loop. > tasks-rude: > like tasks, but different? build to handle tracing while rcu-idle, > even though that was already deemed bad? This waits for the tasks that RCU Tasks cannot wait for. If noinstr is fully fixed, RCU Tasks Rude can go away. > tasks-tracing-rcu: > extention of tasks to have critical-sections ? Should this simply be > tasks? Tasks Trace RCU is its own thing. It uses rcu_read_lock_trace() and rcu_read_unlock_trace() to mark its readers. It can detect quiescent states even when the task in question does not call schedule(). Unlike Tasks RCU, Tasks Trace RCU does not scan the full task list. (It used to, but that caused latency blows on non-realtime workloads.) Tasks Trace RCU allows preemption and blocking for page faults in its readers. Also blocking on non-raw spinlocks in PREEMPT_RT, but I am not sure that anyone cares. If you want to block on anything else, you need to talk to the current Tasks Trace RCU users. Thanx, Paul > Can someone complete, please? > > >