Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp434883rdf; Tue, 21 Nov 2023 06:47:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGf+IDDbvyQ6Jw+4MCrQonJQX8W3dFsmx+CNZExahfsIU+YFLFTu7ywKeW0ClvkfYQpqO1R X-Received: by 2002:a17:903:11d0:b0:1ce:63f2:e96f with SMTP id q16-20020a17090311d000b001ce63f2e96fmr11946874plh.22.1700578036434; Tue, 21 Nov 2023 06:47:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700578036; cv=none; d=google.com; s=arc-20160816; b=JfC8k7qcdhZCl4xfdmRoPFBgfrlp6vd0G0uO3ZsUbWaNfIU+lTPsxH8MXc6wNAKAPD RLeD4rD2n8yg5cQJ6zCbA3ky9Qi+gpt4uBjyanyCRxxlnj2djarwb/wjcw12A++kQj4h DNj7K7ZBQvBsZqg/D7p/kPsYO+oATtcqYjqvxuejbZJRCtPpeZ6CHtl5w6B6xFm18Bl9 Cr+oMPGnCXx9KS7BGnEx2VPPY8P6hzBw/shmZG4OFRR+eorNp8eFMKj3b5tXKSL0sYto h1Rl8BLEmBQiNbXQDUoO2IL4aUUlmOb01nwfFdx51NzXmftvc7rjTE4j81yAhuKZCywf v9WA== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=Aze8F9xApdcP3sSDxB0vKPHogCta51Nh1owv78ypPIE=; fh=z9Hiijo2AEjSuQa407xYLVoBdVXTx1tb3RJVTAa8V68=; b=LBXmND6VKT7a02kliHBMe2Kkek9st8M2Lq44ScjVJaJzf3eWTmK89cTpS9P4FE4Boq I2N29S4lF67uKu5ROp/VHHs0dafoTVFndDxqSVyYGxzAfwAjgaJ4ptaz80dcfvgB194s dJqrOkEG8YWg92S+OkoWQriZ3kmGoERRvWSEaH2vanz6hq0ClqPxpjTh7ee3bUCG6gcb 36LETr9xrkcUT6rMCgkTptkleQmaRmJ9XnvX2NeEuZemFfsDRgkVqgk5CV8JefmsA1yL f6fBG2X4X3hqW9Tv+8NbiQo3cWQDSiOTx2zOiYCFKnnDz60IJiHPOFpTRkm1YUVZWVa4 BrWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bRlliqlO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id h13-20020a170902680d00b001cf58865d09si5797790plk.328.2023.11.21.06.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 06:47:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bRlliqlO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9C253804C6DA; Tue, 21 Nov 2023 06:47:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234599AbjKUOrF (ORCPT + 99 others); Tue, 21 Nov 2023 09:47:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234535AbjKUOrD (ORCPT ); Tue, 21 Nov 2023 09:47:03 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02CE19A; Tue, 21 Nov 2023 06:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Aze8F9xApdcP3sSDxB0vKPHogCta51Nh1owv78ypPIE=; b=bRlliqlOmmt1m6U87HdTA1PKF/ r57QZUcdhAwp4t6nN0mgH4yyIsCoRBlIpzVc/gDm0lwjyFZj5Bl6WFWJoUjVFmJYg+WRrztocYW3y 0JB5C8EdhLYNa9qNbZpDnzLUxyBMcw6ngn1wbUWlq1TeNneDf9i0yHNvpsElbs6NqwfryRXhS+vLl nFVuo7hpcJIpqKX/iO6QHwKr280ftdAZKtFRFZU30dA4hD9wb0XFBwsVY86pOebC6pjowVjdYDc4v XS32+wv9oA4cjKi/tnutrXsk/t5UjtsGpLJNatekHwqCKAdv5xGTSm4/lZ9GJdIixEnrSt0VebZ4h eU7geMsQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1r5S1T-005g1B-UG; Tue, 21 Nov 2023 14:46:44 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 81FF7300338; Tue, 21 Nov 2023 15:46:43 +0100 (CET) Date: Tue, 21 Nov 2023 15:46:43 +0100 From: Peter Zijlstra To: Mathieu Desnoyers Cc: "Paul E. McKenney" , 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: <20231121144643.GJ8262@noisy.programming.kicks-ass.net> References: <20231120205418.334172-1-mathieu.desnoyers@efficios.com> <20231120205418.334172-2-mathieu.desnoyers@efficios.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6f503545-9c42-4d10-aca4-5332fd1097f3@efficios.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 21 Nov 2023 06:47:13 -0800 (PST) On Tue, Nov 21, 2023 at 09:40:24AM -0500, Mathieu Desnoyers wrote: > On 2023-11-21 09:36, Peter Zijlstra wrote: > > On Tue, Nov 21, 2023 at 09:06:18AM -0500, Mathieu Desnoyers wrote: > > > Task trace RCU fits a niche that has the following set of requirements/tradeoffs: > > > > > > - Allow page faults within RCU read-side (like SRCU), > > > - Has a low-overhead read lock-unlock (without the memory barrier overhead of SRCU), > > > - The tradeoff: Has a rather slow synchronize_rcu(), but tracers should not care about > > > that. Hence, this is not meant to be a generic replacement for SRCU. > > > > > > Based on my reading of https://lwn.net/Articles/253651/ , preemptible RCU is not a good > > > fit for the following reasons: > > > > > > - It disallows blocking within a RCU read-side on non-CONFIG_PREEMPT kernels, > > > > Your counter points are confused, we simply don't build preemptible RCU > > unless PREEMPT=y, but that could surely be fixed and exposed as a > > separate flavour. > > > > > - AFAIU the mmap_sem used within the page fault handler does not have priority inheritance. > > > > What's that got to do with anything? > > > > Still utterly confused about what task-tracing rcu is and how it is > > different from preemptible rcu. > > In addition to taking the mmap_sem, the page fault handler need to block > until its requested pages are faulted in, which may depend on disk I/O. > Is it acceptable to wait for I/O while holding preemptible RCU read-side? I don't know, preemptible rcu already needs to track task state anyway, it needs to ensure all tasks have passed through a safe spot etc.. vs regular RCU which only needs to ensure all CPUs have passed through start. Why is this such a hard question?