Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp543663ybg; Thu, 19 Mar 2020 04:32:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuFM2qMBWJv+CPJaElRr26RPjOGyG9Fs90uBd3/lWtRaoWxcXQjlfHW8++XCgr6cuO0lQjn X-Received: by 2002:a05:6830:1c7:: with SMTP id r7mr1952787ota.129.1584617574991; Thu, 19 Mar 2020 04:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584617574; cv=none; d=google.com; s=arc-20160816; b=XSbZ/FMAatHD6Itai+SDgn4BYjlIjn/WipAXVEJQ3qQO65mAOAU7h77dl/1LGQCaDA pzM7EgmKfBVbN0JqQYeRywcHpzSFFrdLx6cAwtSrIPhPApume/BKtpDgjzQJRG+jTTXl lW5RZWDk8xf09XeFxeQFnZt4GwhwJL2ryMXys8v+WjeBvOq0HIRCnPJJCr7RXd62mEv1 sryrMk0J7ew1M4kLguWbyrocETKOubOzr1HN2Cj1zDxKZDcE6xjFbVl/2H42mBldFM4M h/xNOpSY0rIdNp0RogyzVGMaB5+jjuPalVj/AGg8aYbK2bB8VkcMayNZrH51RaPHMRas +HaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=33PE+wHkowtO9q6IEzq84nL2/t8zfbrTwvP2Nousw5Y=; b=MwREFztXTxPQbuC4Di5VM+dEziZ3/0FAJ5hSQsfGUVEmYAKj3QnC41xC8u07XfY5Ed ZDjH77qVyrccLyIFr58H1joa5ejlgPocNR3o+vbB23hCt28BPaVa9ECz/lkhRIo/DgcY jCklfjuolHziDuxD3NkYOMqKt/g0zc189L7aX55Qg4zZBwxOwveF/Jd1+iWzSlvJLIYt Nv0shphXSmT8lzVOeZZif7ZrVg35uIlCz1nSHOwXXgPqjRsxgrCPA5Koj5VBXN9vpnOY Fxfw4XhuBCBw7FyPSGQStZ5egL3XSUvNYukSkk3+FiAxJaVBXWF3Ob0sh5nO1FC4QfKS 4zDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=Q+vMaB5H; 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=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si944072oix.138.2020.03.19.04.32.33; Thu, 19 Mar 2020 04:32:54 -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=@efficios.com header.s=default header.b=Q+vMaB5H; 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=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbgCSLbl (ORCPT + 99 others); Thu, 19 Mar 2020 07:31:41 -0400 Received: from mail.efficios.com ([167.114.26.124]:45242 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726589AbgCSLbl (ORCPT ); Thu, 19 Mar 2020 07:31:41 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 7F11D2770D4; Thu, 19 Mar 2020 07:31:39 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id e4u4qStRjov8; Thu, 19 Mar 2020 07:31:39 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 0A76C27707A; Thu, 19 Mar 2020 07:31:39 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 0A76C27707A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1584617499; bh=33PE+wHkowtO9q6IEzq84nL2/t8zfbrTwvP2Nousw5Y=; h=Date:From:To:Message-ID:MIME-Version; b=Q+vMaB5H1MB713ANUwit7l2CThsKP8JirEhWwLMXRUOQoM2z82UYx0bva+XRyCSJN QJEeysq3BzXiw2vy3R/F2QqElDa6Jt227FjVFvZUxLtTT9coZ7ToKBRByKSoLS62O4 F7Fw+ZLVMo8dS0DZitQJ8F5J/le5WNGzGBPUwuT9LtTWBHEC+/SZ9/YQosjXVchx5K lxLdsMqEk1H7Fqi+71/YQuXZcfEl9OX49r6WxShirgNHb8Z7P4p190vamDSm06AcLp ZitDj9SyI8hDWgHc4LOcn4zsiFsgp7TVqdjQLIZQeU8pu9P/ZUFyoUzmcZp3ZI9Wor QyZkXBzpQwjxQ== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6lGsIg_VnFta; Thu, 19 Mar 2020 07:31:38 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id E90C22772C4; Thu, 19 Mar 2020 07:31:38 -0400 (EDT) Date: Thu, 19 Mar 2020 07:31:38 -0400 (EDT) From: Mathieu Desnoyers To: paulmck Cc: rcu , linux-kernel , kernel-team , Ingo Molnar , Lai Jiangshan , dipankar , Andrew Morton , Josh Triplett , Thomas Gleixner , Peter Zijlstra , rostedt , David Howells , Eric Dumazet , fweisbec , Oleg Nesterov , "Joel Fernandes, Google" Message-ID: <1560487611.2836.1584617498827.JavaMail.zimbra@efficios.com> In-Reply-To: <20200319001024.GA28798@paulmck-ThinkPad-P72> References: <20200312181618.GA21271@paulmck-ThinkPad-P72> <20200319001024.GA28798@paulmck-ThinkPad-P72> Subject: Re: [PATCH RFC v2 tip/core/rcu 0/22] Prototype RCU usable from idle, exception, offline MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3918 (ZimbraWebClient - FF73 (Linux)/8.8.15_GA_3895) Thread-Topic: Prototype RCU usable from idle, exception, offline Thread-Index: /+aQCcRF3e2v6wZPv8fU+JWQy6IuTg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Mar 18, 2020, at 8:10 PM, paulmck paulmck@kernel.org wrote: > Hello! Hi Paul, Thanks for pulling this together! Some comments below (based only on the cover message), [...] > There are of course downsides. The grace-period code can send IPIs to > CPUs, even when those CPUs are in the idle loop or in nohz_full userspace. > However, this version enlists the aid of the context-switch hooks, > which eliminates the need for IPIs in context-switch-heavy workloads. > It also prohibits sending of IPIs early in the grace period, which > provides additional opportunity for the hooks to do their job. Additional > IPI-reduction mechanisms are under development. I suspect that on nohz_full cpus, at least some use-cases which really care about not receiving IPIs will not be doing that many context switches. What are the possible approaches to have IPI-*elimination* for nohz cpus ? > > The RCU tasks trace mechanism is based off of RCU tasks rather than > SRCU because the latter is more complex and also because the latter > uses a CPU-by-CPU approach to tracking quiescent states instead of the > task-by-task approach that is needed. It is in theory possible to > mash RCU tasks trace into the Tree SRCU implementation, but there > will need to be extremely good reasons for doing so. I have a hard time buying the "less complexity" argument to justify the introduction of yet another flavor of RCU when a close match already exists (SRCU). The other argument for this task-based RCU (rather than CPU-by-CPU as done by SRCU) is that "a task-by-task approach is needed". What I do not get from this explanation is why is such an approach needed ? Also, another aspect worth discussing here is the use-cases which need to be covered by tracing-rcu. Is this specific flavor targeting specifically preempt-off use-cases, or is the goal here to target use-cases which may trigger major page faults within the read-side critical section as well ? Note that doing task-by-task tracking of tracing-rcu rather than cpu-by-cpu is not free: AFAIU it bloats the task struct (always) for a use-case which is not always active. My experience with tracepoints and asm gotos is that we need to be careful not to slow down the common case (kernel running without any tracing active, but tracing configured in) if we want to keep distributions and end users building kernels with introspection facilities in place. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com