From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can Date: Mon, 23 Apr 2018 17:22:44 -0400 Message-ID: <20180423172244.694dbc9d@gandalf.local.home> References: <20180417040748.212236-1-joelaf@google.com> <20180423031926.GF26088@linux.vnet.ibm.com> <409016827.14587.1524493888181.JavaMail.zimbra@efficios.com> <20180423105325.7d5d245b@gandalf.local.home> <1045420715.14686.1524495583859.JavaMail.zimbra@efficios.com> <20180423121800.47b173af@gandalf.local.home> <1212130312.14753.1524503541789.JavaMail.zimbra@efficios.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 To: Mathieu Desnoyers Return-path: In-Reply-To: <1212130312.14753.1524503541789.JavaMail.zimbra@efficios.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-rt-users.vger.kernel.org On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) Mathieu Desnoyers wrote: > I'm inclined to explicitly declare the tracepoints with their given > synchronization method. Tracepoint probe callback functions for currently > existing tracepoints expect to have preemption disabled when invoked. > This assumption will not be true anymore for srcu-tracepoints. Actually, why not have a flag attached to the tracepoint_func that states if it expects preemption to be enabled or not? If a trace_##event##_srcu() is called, then simply disable preemption before calling the callbacks for it. That way if a callback is fine for use with srcu, then it would require calling register_trace_##event##_may_sleep(); Then if someone uses this on a tracepoint where preemption is disabled, we simply do not call it. -- Steve