Received: by 10.192.165.156 with SMTP id m28csp1396198imm; Mon, 16 Apr 2018 21:11:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx48kdPMHrMCM9A30xfkcoJ+bRimhuyZNPogeTpjwJP2chmM5LjLJpM5reIre3ptdzQFCmPKo X-Received: by 2002:a17:902:b7c9:: with SMTP id v9-v6mr533394plz.35.1523938276308; Mon, 16 Apr 2018 21:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523938276; cv=none; d=google.com; s=arc-20160816; b=NR5LpiEum1ecMJYSe4jibNEZuRZZxD03b6VuS9eWqI5kbjOJpgS2WFbJ4xpwW7+yil EInKUCczSDsRZVcN4KJSPnRxkDyeD4XGJr04N82mPGuVgQHNY3N4t2ctU7lXPU/oMebp qtvycdhnCu7yvorPBxeKVrIw2bHcR0H2Ug9DuUPVCVa7WsRF1JtL1g44vnLGqfTSRwg8 2T93DguIDitZE7+JO2Y/yUdh8oQiQxS5x2gRPCWJE9/oUAmwNGH4h1hRzDHF28T0fULt FPro1lQc9o0z0dR4Qc///kFeJKVbmSGQch0SrfKQdj+z0lUfE/6D+DwHW4uNjGsWYAvW iGeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jS9aV+0OX9FDGkz4sQVqeBDS14Ke3ohS/leLYnhCE+4=; b=noNBEmQTYJvnzbsfdKJK/Zr8cfUTO5BjrHJrhiP8K1NgSjxmSj6pTLNatR2s1fkt3o Br0zqdpzsR8P8IDIseZ7eQjcBASAWfWbrCeNUX6wTPN6nEOG817qrajjPtS/FEeF7ya1 DduSWadewbIgvur9WTd7H+C3aipBWWs7bZdh41V3aODPbReVBDlmX3gzPBXJT56CaHCH 5vb61wNgZGK4d5kCdX/+l8QWIXnPDPhQY3eFWrP9My/2ap+V7QhnGYVNWfsInpzKbgQR aoGUseCv7HK0aWuLUJSkJhzWz5EmV6E5IdJ3Y9pNyxXsXV+LjraeNakdA1/CVIKQrDJf 4z0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=akMw3LTm; 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 z3si10889664pgc.452.2018.04.16.21.11.01; Mon, 16 Apr 2018 21:11:16 -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=akMw3LTm; 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 S1751082AbeDQEIL (ORCPT + 99 others); Tue, 17 Apr 2018 00:08:11 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37462 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbeDQEIK (ORCPT ); Tue, 17 Apr 2018 00:08:10 -0400 Received: by mail-pg0-f68.google.com with SMTP id r14so4808140pgq.4 for ; Mon, 16 Apr 2018 21:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=jS9aV+0OX9FDGkz4sQVqeBDS14Ke3ohS/leLYnhCE+4=; b=akMw3LTmgzzcQXMNu2PtjPip7J2DkiKj2ZsxEe9H5e70aYlYfwv4jp3TkYxRjEVV2q eAiMo0D4IdxpN3Igtu4B4uwLNRB7a52AXlVi7KC1O9M6CI4ELO6LpFHzgpVKn2iu08Ms aL8mOdqGFy8S45J98EvcrVf+nsL0QkBz4eYaoPCpUxc1nO7y3VHJBzSdA1Ox/1pZ0Qng S3PLk0uRzVwOKAZ63ZwJD0IAU0OkyXGM+hfTKE00iY2yps7tdcQlDisUG5G99PLUeKRY laKJB5RsNHulxNsVsc23XsS81qaBJTKgo05IeIeqswKyFpLL2x/d8dkqInIDp5aUgTr3 gbXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jS9aV+0OX9FDGkz4sQVqeBDS14Ke3ohS/leLYnhCE+4=; b=qUjK/Xt4vPPEGy0N/xNJX/Otgwx6RS3LJm2apwKF62wpJSWdda+MQCAFImujrYV0Nn Ah8w4dlfbY717Nubb+KUK6EYAFfpLGjbWmK8kIRaDJw1Mpfds/9W19s5l6IZvGGrEphk iJJogWaUPOvAfDUka2cp8WPsCjpzCOlMKLQBEcn7lqG2N1L223iqXAm+cga/SLswPbKS bOCMPB3fbMmbY+1CmTx2deIfje+axuVTdeRYH0fLCam94kzcaW69XKuY41XQb1c+hDfE 09b6MqDEQk6FzV+qx+sPvz71ISEkyR61ip8XeKXVb6b2uk+30x0QtHZWPKOOiiW5T32f +h0A== X-Gm-Message-State: ALQs6tCbt8w3sTs2iqJlF2w3BI82I1z02xj/eciyogaAo9yGukK4AhMy kX9m71+9KKJH13xQGeMtNpatxN6EY3s= X-Received: by 10.99.119.206 with SMTP id s197mr456697pgc.272.1523938088403; Mon, 16 Apr 2018 21:08:08 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1611:2dd1:700f:d2f3:1711]) by smtp.gmail.com with ESMTPSA id j11sm23504686pgc.91.2018.04.16.21.08.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 21:08:07 -0700 (PDT) From: Joel Fernandes To: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Cc: Joel Fernandes , Steven Rostedt , Peter Zilstra , Ingo Molnar , Mathieu Desnoyers , Tom Zanussi , Namhyung Kim , Thomas Glexiner , Boqun Feng , Paul McKenney , Frederic Weisbecker , Randy Dunlap , Masami Hiramatsu , Fenguang Wu , Baohong Liu , Vedang Patel Subject: [RFC v4 0/4] Centralize and unify usage of preempt/irq tracepoints Date: Mon, 16 Apr 2018 21:07:44 -0700 Message-Id: <20180417040748.212236-1-joelaf@google.com> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, This is the next revision of preempt/irq tracepoint centralization and unified usage across the kernel [1]. The preempt/irq tracepoints exist but not everything in the kernel is using it. This makes things not work simultaneously (for ex, only lockdep or irqsoff events can be used). This series is an attempt to solve that. I fixed several issues since last rev and I'm posting it slightly early than I wanted to for some feedback especially for the new patches 1-3 in this series. Also any testing is deeply appreciated. Status: Currently I'm noticing a performance issue with "enabling" of the preemptoff tracer (not during its running but the enabling/startup of it). I narrowed this down to rcu_irq_enter_irqson and rcu_irq_exit_irqson calls in tracepoint.h. Commenting these out makes the perf issue go away. I also notice that disabling function tracer also makes the issue go away. Note that I ran hackbench and don't notice any performance issues with my patch itself per-se, however the preemptoff tracer startup seems slow and I'm debugging that. If you have a clue why this might be happening, please let me know. Note that I skipped v3 because I used that number already for some internal reviews of these patches. Also I changed the subject back to RFC in light of the lockdep issues I fixed this time and added some more folks for review. Thanks much for any review or testing. [1] https://www.spinics.net/lists/kernel/msg2750826.html Joel Fernandes (4): tracepoint: Add API to not do lockdep checks during RCU ops softirq: reorder trace_softirqs_on to prevent lockdep splat irqflags: Avoid unnecessary calls to trace_ if you can tracing: Centralize preemptirq tracepoints and unify their usage include/linux/ftrace.h | 11 +- include/linux/irqflags.h | 32 +++-- include/linux/lockdep.h | 8 +- include/linux/preempt.h | 2 +- include/linux/tracepoint.h | 32 ++++- include/trace/events/preemptirq.h | 23 ++-- init/main.c | 5 +- kernel/locking/lockdep.c | 35 ++--- kernel/sched/core.c | 2 +- kernel/softirq.c | 6 +- kernel/trace/Kconfig | 22 +++- kernel/trace/Makefile | 2 +- kernel/trace/trace_irqsoff.c | 206 +++++++----------------------- kernel/trace/trace_preemptirq.c | 73 +++++++++++ 14 files changed, 229 insertions(+), 230 deletions(-) create mode 100644 kernel/trace/trace_preemptirq.c Cc: Steven Rostedt Cc: Peter Zilstra Cc: Ingo Molnar Cc: Mathieu Desnoyers Cc: Tom Zanussi Cc: Namhyung Kim Cc: Thomas Glexiner Cc: Boqun Feng Cc: Paul McKenney Cc: Frederic Weisbecker Cc: Randy Dunlap Cc: Masami Hiramatsu Cc: Fenguang Wu Cc: Baohong Liu Cc: Vedang Patel -- 2.17.0.484.g0c8726318c-goog