Received: by 10.192.165.148 with SMTP id m20csp3518641imm; Mon, 23 Apr 2018 07:55:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+55WU2sq99BGwumueZXRifozXPrh89cGa15MY5IGAABMPB6/+hgYsY2y7FomnGvDQDqaYr X-Received: by 10.98.202.74 with SMTP id n71mr8631067pfg.149.1524495326678; Mon, 23 Apr 2018 07:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524495326; cv=none; d=google.com; s=arc-20160816; b=hwJ5skNZxCP0GZHa8dab81aqcpWJGoE8vczQi8xLx92FTgIjfaVSFoLsvvuuRvKSIO 0W40xmH7QpJrqVzSzaRVzDlgxOWZEKYXmZmRN+DWL15m69x4tyEBIOG0XG1DT6b58X6n Ykh3dTyHT/Ts0hPnxiuCW3N751J6l+p7M91z2ZiIWddXwowgb1buBtl3Fsnb3ZJnYhNo G+qPTFB3HuX3Jx5krJdLsrh7r8MrloN0iPGuLfxelqHnkaf+kYEgy8K0kGRK5Plpge3A hwXyQizvxwGHVZUVaI12L4eXytiKi7DEAQQ0CPpKiv88WBK4XcWYPGtKx5DLGMgBZPTp /+sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=DZ1zym/qsJDNsy8t3qrkY/Vg7R1lyyAqLyLY1LFVyuo=; b=GYhGtoisviVlVvBJIxQU8+BfIbCuA8ZiV8dXvWqj9gXqyo2UOEFuQxmozbL01vYVXe 9mPB+xBG5hkUVeI2pSArUlPyBpJF/bIcNaA3wd7PBEVxrg4jmIihF27mVPoXfMl8ag8c bsUyObicLbstqzYkZMJrsGK7cUdXsKnKSnVpGGdHjcU/Bo/iBSBdmNuDV5AJkizAeUIe hjJnEQ96K6TQk1q4VzuAjjumAVwXakNafyW1biCxwDVgqKCOAZ/ubHJYPQMhVzPGZgCc OI6vVxvaIIcDyqQQcKdw8meUKH5tAKNxl601E/VuwvAoL3krPmghGPy7mcPzZO/ax5Ro kDSw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m65si11215767pfb.130.2018.04.23.07.55.12; Mon, 23 Apr 2018 07:55:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755713AbeDWOxd (ORCPT + 99 others); Mon, 23 Apr 2018 10:53:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:46154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755423AbeDWOx3 (ORCPT ); Mon, 23 Apr 2018 10:53:29 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.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 E7C4C21782; Mon, 23 Apr 2018 14:53:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7C4C21782 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Mon, 23 Apr 2018 10:53:25 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: "Paul E. McKenney" , Joel Fernandes , Namhyung Kim , Masami Hiramatsu , linux-kernel , linux-rt-users , Peter Zijlstra , Ingo Molnar , Tom Zanussi , Thomas Gleixner , Boqun Feng , fweisbec , Randy Dunlap , kbuild test robot , baohong liu , vedang patel , kernel-team@lge.com Subject: Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can Message-ID: <20180423105325.7d5d245b@gandalf.local.home> In-Reply-To: <409016827.14587.1524493888181.JavaMail.zimbra@efficios.com> References: <20180417040748.212236-1-joelaf@google.com> <20180417040748.212236-4-joelaf@google.com> <20180418180250.7b6038dddba46b37c94b796c@kernel.org> <20180419054302.GD13370@sejong> <20180423031926.GF26088@linux.vnet.ibm.com> <409016827.14587.1524493888181.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) Mathieu Desnoyers wrote: > I've been wanting to introduce an alternative tracepoint instrumentation > "flavor" for e.g. system call entry/exit which rely on SRCU rather than > sched-rcu (preempt-off). This would allow taking faults within the instrumentation > probe, which makes lots of things easier when fetching data from user-space > upon system call entry/exit. This could also be used to cleanly instrument > the idle loop. I'd be OK with such an approach. And I don't think it would be that hard to implement. It could be similar to the rcu_idle() tracepoints, where each flavor simply passes in what protection it uses for DO_TRACE(). We could do linker tricks to tell the tracepoint.c code how the tracepoint is protected (add section code, that could be read to update flags in the tracepoint). Of course modules that have tracepoints could only use the standard preempt ones. That is, if trace_##event##_srcu(trace_##event##_sp, PARAMS), is used, then the trace_##event##_sp would need to be created somewhere. The use of trace_##event##_srcu() would create a section entry, and on boot up we can see that the use of this tracepoint requires srcu protection with a pointer to the trace_##event##_sp srcu_struct. This could be used to make sure that trace_#event() call isn't done multiple times that uses two different protection flavors. I'm just brain storming the idea, and I'm sure I screwed up something above, but I do believe it is feasible. > > I would be tempted to proceed carefully and introduce a new kind of SRCU > tracepoint rather than changing all existing ones from sched-rcu to SRCU > though. Agreed. > > So the lockdep stuff could use the SRCU tracepoint flavor, which I guess > would be faster than the rcu_irq_enter_*(). Also agree. -- Steve