Received: by 10.192.165.148 with SMTP id m20csp4830576imm; Tue, 24 Apr 2018 09:03:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrvaXI3qVD0OkSIc3RyzpRnrCE4XhSD8WpmjTSApqCf9WHDyXpoXjCo1SogTlZHix7u/Sda X-Received: by 10.98.171.16 with SMTP id p16mr3950668pff.211.1524585808008; Tue, 24 Apr 2018 09:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524585807; cv=none; d=google.com; s=arc-20160816; b=WwXzTYZ+G6PrfDcA9oq8p1mBp3MvmDl61M+7VTT7vEXUx6Tdc8z1n1u4bd6MboJOcU 17BC/dad28gD54a8/aE3fesINSq8waqzjfmBeiWx9AQXuoYPje6gavQ5mfAVNfus9eid aNd7p3qMlNv9w4VUH1XQWSzSbIT910M4hADr6NwGIcJgdeGq7aat7/zYTviwFKTox0yt oNPVLRT1gf8Tn9j8vJCVvxC405h1KX8g+L3vm3Eg1ORSCx5Jcwl0QuvEJAfZmvLPQz2p O1lotlJ7/kgqr7E7szm9Z8hnlnn1SvbqEX78ppxpPK8viNtJvSYOaD1vclqW0FB0HPgS 2zDA== 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=zWFmOPX3fEUtYZ4YGDBAl18+eqxdcna/k47V4Jfrtuw=; b=sWi6TauAK+V+TcIScCtT8gxHPu38I9Bbqum5wzKTP7vo9PUnF9Lp9yq2KTSbAPzv1C 5mOIaPiqSCZPeMvXKRObS66G2mH2E1hBg9T7puVf/Hzee9x1PFLBTAxPdc81hkUm19K7 FceR/ZzXVGDLbHqLhNt8IuJeaYgsPsZW3K+Hy0iS9yC8p1k5XKAN7sS37Z2SLrLMR6M/ 2iI0E7MDVCp7bnjjxRLgcXjUH0PU7CzIV0rbdl0xmPs2JuSXoOzVKM52CR83wnlF0iR9 IZh+VABVorEST5CgZTUrtmP6JXJAuakiY4Mu/tK6K2MvPURXOD91Yfy2nvDn7ZvAwCiE kmXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=GjtIDmlH; 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 e7-v6si14264148plk.397.2018.04.24.09.03.13; Tue, 24 Apr 2018 09:03:27 -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=GjtIDmlH; 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 S1750943AbeDXQBj (ORCPT + 99 others); Tue, 24 Apr 2018 12:01:39 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:34400 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbeDXQBg (ORCPT ); Tue, 24 Apr 2018 12:01:36 -0400 Received: by mail-io0-f194.google.com with SMTP id d6-v6so23328525iog.1 for ; Tue, 24 Apr 2018 09:01:36 -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=zWFmOPX3fEUtYZ4YGDBAl18+eqxdcna/k47V4Jfrtuw=; b=GjtIDmlH8UvGBnXDmJ3DrycZ7J2XikThr4Y3cNfUENK4aJxd0woYimaIToEGh1kJuE //xCyOzBHXAQF5XrcauOgQaD5+N2JZ2MGfJcjv0wUv9z/sCn5UiJHBQZJE8dYr+ljPe6 1FZcpBqyku+Bsa2jKHAF5xJkquHrpRTf7WeWt9s1s3IQsEATvckxNKX7jstX8B23cMx/ Dc+jxtTeXOzRffzjp731GVEmlCEpcYoFK2DaZKwJ6EvFfdIxdhHI/FyLeHccNiIScKyz 3XA9OzncKNtXRnl+OEC81hriA7tTlocFFRM5umMEU9rAvPvsCNzTedL9qj+4SlqvGeL4 9FQg== 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=zWFmOPX3fEUtYZ4YGDBAl18+eqxdcna/k47V4Jfrtuw=; b=hNP35rKN5LLDOx1HanztuGpLa37r5NiIG2OR/LzT3d75LF+Rfi95GJkhyjQQfTWrgB pY7/y3uMJ3Neuxqxd0J+TNEKyg6JOKIurMhe2Yy/5NQdnNxVLmfBEfYVoISYtAzn1ZLD 2AYAfZZE+fj0e+HjY9d1M8EwzpVjSeq2Mg+WN6uB8Eu/9Z3KsI0/Fm1GZtdxgWwdRxFf MLZmpMbobIeoCEUGxU7FQNDMUg+nf4LoscfAozyY3WQ3cSVMbyL909jKFS9cZxG+WzgX YhtYi9sPZXUSrQwCv6VQcCkkC/EbAKeYMlQhg9frU9cGE8116ipCrO9mjPjtbe10y59F kjiw== X-Gm-Message-State: ALQs6tCRga5gnQgo3NZK1GXPmbNN3qzF+KyRPjQbLYEkx191kMMC2ARL o/QwExuWE3CrU8Xux2Yetl6XGyeIThu5uQzV5XFj0g== X-Received: by 2002:a6b:83da:: with SMTP id n87-v6mr27258360ioi.268.1524585694792; Tue, 24 Apr 2018 09:01:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.181.213 with HTTP; Tue, 24 Apr 2018 09:01:34 -0700 (PDT) In-Reply-To: <20180424155655.GA820@linux.vnet.ibm.com> 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> <20180423172244.694dbc9d@gandalf.local.home> <20180424155655.GA820@linux.vnet.ibm.com> From: Joel Fernandes Date: Tue, 24 Apr 2018 09:01:34 -0700 Message-ID: Subject: Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can To: Paul McKenney Cc: Steven Rostedt , Mathieu Desnoyers , 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 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 Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney wrote: > On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: >> 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. > > One more stupid question... If we are having to trace so much stuff > in the idle loop, are we perhaps grossly overstating the extent of that > "idle" loop? For being called "idle", this code seems quite busy! ;-) The performance hit I am observing is when running a heavy workload, like hackbench or something like that. That's what I am trying to correct. By the way is there any limitation on using SRCU too early during boot? I backported Mathieu's srcu tracepoint patches but the kernel hangs pretty early in the boot. I register lockdep probes in start_kernel. I am hoping that's not why. I could also have just screwed up the backporting... may be for my testing, I will just replace the rcu API with the srcu instead of all of Mathieu's new TRACE_EVENT macros for SRCU, since all I am trying to do right now is measure the performance of my patches with SRCU. thanks, - Joel