Received: by 10.192.165.148 with SMTP id m20csp917088imm; Fri, 27 Apr 2018 09:31:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqiqe9B3jjipuKLtQfkASiHV1cmP+CCEke85+yZPRfGXwSgZ+ex/LMvf5ILmfEnzPzVPWK4 X-Received: by 2002:a65:4801:: with SMTP id h1-v6mr2685180pgs.96.1524846710491; Fri, 27 Apr 2018 09:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524846710; cv=none; d=google.com; s=arc-20160816; b=AFZLue2PO7kuzXRHAsavw1d/M2VupgEn0Qf95SQE7vKM2Wq9r/C7cQ+xyYJr/b4W3/ 9LFqyrSre+CuyyuKLRbSkVHd3JTnRpKykK8i+rXyqPJWgMWAF6FH90yhaQhljYUalmTH 8E7g1Q5w50T4VaYh0FRuGmtWcl5jYhrQTfkPkPXORnldQGDUl68G/gGymxhtQLI7DnmO Xnp1CLf9D4cEAaEn/T5eTcIv031TR088Kl4AbhkFkTus6iDW/tOgYuihk8DnJV7u8vqD /79FslT5oU/KbvzDHDVHZwmlbGBG4uK5S3n+PDTBlLdndu5ZfA4hVEpES8b3a/hgCutX Mmxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=MmZRzqojvZuckrjVtWyOa+/Ae5TnDzkfBj7KzxYt8M8=; b=tKx+T3EuFIUd1Gon08dXtOEYeQcKSmSIKCi0kI+vge/Y3vD7XJiVbP8ki4Ne4mlApt 2hSiw5FEQs9eqnP/a76bhnXXY1WejSDBJAaiwWeUnFBtgp6PWHhSPFHJs+f96aVv8CYk 58u2ygkCc5vUndbDjKydXft2M9aR7jexXcSu18AQbDrxcR1/4BJBPAfb9iduqsf8ZdSE mpBKPu+HiHoPZdKam8Bb/RAkAKKRfE7N6o0Ut1rlgj8uzHPPLwi4UeNn2sSQ/fnO13B3 JxqFBcx27JeHkvGjlShUv2EW6WmO0deTXPub6YFrojVQMkKpnkC7UHj4n4gJLHTFccS4 8ADA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gIAXp6Zw; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 75-v6si1473717pga.647.2018.04.27.09.31.36; Fri, 27 Apr 2018 09:31:50 -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=@google.com header.s=20161025 header.b=gIAXp6Zw; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758794AbeD0QaI (ORCPT + 99 others); Fri, 27 Apr 2018 12:30:08 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:46183 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758550AbeD0QaG (ORCPT ); Fri, 27 Apr 2018 12:30:06 -0400 Received: by mail-io0-f177.google.com with SMTP id f21-v6so3100993iob.13 for ; Fri, 27 Apr 2018 09:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MmZRzqojvZuckrjVtWyOa+/Ae5TnDzkfBj7KzxYt8M8=; b=gIAXp6ZwIycSJsmXsNkwu176pJuY2mIGhr8FEDRCy1l77NxOuhB25z+iAE3dEotbAd fLanG3LACW9KuOI4kGj0S4yDk5/Jkcv7Idok0mYMyk81Ba6yjhp24XZT18UQk+pMVUE+ QJVQnLDsjEP9FksPC1DaEWvCcE2HT/H1vQAcGqEdvj3zVTuLOnWj6X61E2KZtAOMzONO +dj9xC2xYgfgtxrxupPrdSHva1/Im7V5fPANu5rpW1SNDuuYh9dwn0cQ8gYgsrek1/Br YuGkhu+O31vGgqz/ixzPMk543dnuE1jx9MtQO9LDQzysdUIP7ukiqmx6J3EZBOdYP011 PFVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MmZRzqojvZuckrjVtWyOa+/Ae5TnDzkfBj7KzxYt8M8=; b=CJCq7Xzz9BSm9quk8Cw1jqSH9/IEv+LJiqSz+aqVzLgxvbQyjZJY6E3cSMIvGA4NKX sjLccLZmHXMSyUk9tJ9+ZAXODxr27nlhrJg/7anyh+6/ayNCaNemHPvy9rbBt0NM/qAt 9x8P/3okT/dECVIL10tpCP9xtajH7DlhqN0qT7JRrSQVIKwW1SMayANzDvj3tYp1XMeC HlHOYXCOOsEdbb1W1W2zGZeTm0/WToYcTqSLecx88QxPuKZf3r3REYgFad1NM6AMcXCn 5BpH/Dth0AjD3KlwWeHiALGyXRHQSmfxeQEFCCmhblaKlrmRXvFul8j5KxUust9cnZBl FKYg== X-Gm-Message-State: ALQs6tDH2OgDYslncZ7fTmBh3LrMHkcvZYkzbo3OgTQ+iTy7xQGVY+4V Q8QUsYNEJHYV+Hdeya+EN/976Cm6XBIgsEBFGtcUUg== X-Received: by 2002:a6b:844c:: with SMTP id g73-v6mr3072850iod.251.1524846605901; Fri, 27 Apr 2018 09:30:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.181.213 with HTTP; Fri, 27 Apr 2018 09:30:05 -0700 (PDT) In-Reply-To: <20180427104747.2d965925@gandalf.local.home> References: <20180427042656.190746-1-joelaf@google.com> <1169911546.5820.1524839189395.JavaMail.zimbra@efficios.com> <20180427104747.2d965925@gandalf.local.home> From: Joel Fernandes Date: Fri, 27 Apr 2018 09:30:05 -0700 Message-ID: Subject: Re: [PATCH RFC] tracepoint: Introduce tracepoint callbacks executing with preempt on To: Steven Rostedt 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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 : 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