Received: by 10.192.165.148 with SMTP id m20csp925561imm; Fri, 27 Apr 2018 09:39:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoFX6jc8BwUdefFbFyWQr5mlx3wN1UHxFu7xUW3A0re97mpwpMK3TtvC2Rgqzctl4JRc6qW X-Received: by 2002:a17:902:820d:: with SMTP id x13-v6mr2827308pln.225.1524847176728; Fri, 27 Apr 2018 09:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524847176; cv=none; d=google.com; s=arc-20160816; b=thiF5bI+FBxDihFgsGVQVjZfJADSrBx3eqmM99khkhXNA14gwiiJQXupU86oNKqjjG 8AniqEz+lAaYFm2xdjULUNCmjtJ3pFYVMQRZlRZ5tQ+oK/s/Kj644CT1cnTmIhlfyWgl HcWAPU97VFbJMd4H9GRMHi6tSZusda7hahulfNn9cXIx5WxX5tlEqV1Q/tvTNl4z2YDn mL80IXwm8U9emEW1RmxuR9MGSb68bk/hhZdPBxXSfzch2Ql3haPY4m4jxDUveqUxpguF DD+SRb8Cm/Q0PonguBWz7vtTs9sH4U8ryPw8rJqYICTHv+RrsSFTYZNd3tDwIqOHEyEm 8Ung== 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=YTKSiXwN3REM2yRZSH1bwRB+if7Gd6ADGEp1zgtKvH4=; b=pC6Mb8y+XcIgGIZ1LZ6ZmS5v/PjUR9VgiOhGGkKFhgivV50dqBRkzOMCX1TZaVX+em l4swAB7Usf+8XFgGq6ssgKUvXN4Pqg0Cr4QXgp2/R5ZoEr3F7bAFbmGQTmFTMDIC22Kh lgGzlB6PqJkkHgUAD/C18pWKZoRuWPF4SPViCyrejV8LiuGkTogh8doH3lBwoePT6/m8 QnEfhAseGGJSSlh300FQKiKQho/Sr5IFxvR/bwtDf++g3UzTwbnc4EYoFNhZc76zlNt3 4UZ+eclqT+TS+L9QZ4WQKPRGWQRP/+yh+EF5SkgPQeOBr/7TQxpfpzCJhV+wIl3m2OT1 4bYQ== 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 c16-v6si1440295pgv.574.2018.04.27.09.39.22; Fri, 27 Apr 2018 09:39:36 -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 S1758784AbeD0QiF (ORCPT + 99 others); Fri, 27 Apr 2018 12:38:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:53504 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757716AbeD0QiE (ORCPT ); Fri, 27 Apr 2018 12:38:04 -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 DEA01218CA; Fri, 27 Apr 2018 16:38:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEA01218CA 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: Fri, 27 Apr 2018 12:37:59 -0400 From: Steven Rostedt To: Joel Fernandes Cc: Mathieu Desnoyers , linux-kernel , Peter Zijlstra , Ingo Molnar , Tom Zanussi , Namhyung Kim , Thomas Gleixner , Boqun Feng , "Paul E. McKenney" , fweisbec , Randy Dunlap , Masami Hiramatsu , kbuild test robot , baohong liu , vedang patel , "Cc: Android Kernel" Subject: Re: [PATCH RFC] tracepoint: Introduce tracepoint callbacks executing with preempt on Message-ID: <20180427123759.0bc4b8de@gandalf.local.home> In-Reply-To: References: <20180427042656.190746-1-joelaf@google.com> <1169911546.5820.1524839189395.JavaMail.zimbra@efficios.com> <20180427104747.2d965925@gandalf.local.home> 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 Fri, 27 Apr 2018 09:30:05 -0700 Joel Fernandes wrote: > On Fri, Apr 27, 2018 at 7:47 AM, Steven Rostedt wrote: > > On Fri, 27 Apr 2018 10:26:29 -0400 (EDT) > > Mathieu Desnoyers wrote: > > > >> The general approach and the implementation look fine, except for > >> one small detail: I would be tempted to explicitly disable preemption > >> around the call to the tracepoint callback for the rcuidle variant, > >> unless we plan to audit every tracer right away to remove any assumption > >> that preemption is disabled in the callback implementation. > > > > I'm thinking that we do that audit. There shouldn't be many instances > > of it. I like the idea that a tracepoint callback gets called with > > preemption enabled. > > Here is the list of all callers of the _rcuidle : I was thinking of auditing who registers callbacks to any tracepoints. -- Steve > > trace_clk_disable_complete_rcuidle > trace_clk_disable_rcuidle > trace_clk_enable_complete_rcuidle > trace_clk_enable_rcuidle > trace_console_rcuidle > trace_cpu_idle_rcuidle > trace_ipi_entry_rcuidle > trace_ipi_exit_rcuidle > trace_ipi_raise_rcuidle > trace_irq_disable_rcuidle > trace_irq_enable_rcuidle > trace_power_domain_target_rcuidle > trace_preempt_disable_rcuidle > trace_preempt_enable_rcuidle > trace_rpm_idle_rcuidle > trace_rpm_resume_rcuidle > trace_rpm_return_int_rcuidle > trace_rpm_suspend_rcuidle > trace_tlb_flush_rcuidle > > All of these are either called from irqs or preemption disabled > already. So I think it should be fine to keep preemption on. But I'm > Ok with disabling it before callback execution if we agree that we > want that. > > (and the ring buffer code is able to cope anyway Steven pointed). > > thanks, > > - Joel