Received: by 10.192.165.148 with SMTP id m20csp5143046imm; Tue, 1 May 2018 09:46:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoO8OlK7bfy8ZfpUpMkabwoxq9iYDJi1G0E7mZ8re4IGQVVgJUo8iBiV/PdQYnjgTjdJ0BH X-Received: by 2002:a63:8dca:: with SMTP id z193-v6mr13513425pgd.418.1525193160148; Tue, 01 May 2018 09:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525193160; cv=none; d=google.com; s=arc-20160816; b=Ao5xm0H+ZjyvRvbDo+5fq32sBSsD70g6Cr2VYZ41apdSEBYpV8Zk7sSpFdTIuWK93u dqzNF5GmC6os9Xe3UAEKL508MKXRaR4tqqNm7yhh+NwQZVZd6rDitkMxH3XU45egmNAA LLL5r+sbJnnriLKIzJB1XIMhu382e7uDg7e65ERRnrt6YaAykPAT32i2UiMD3J0VRlPQ DyARaqA0eebWXjFYQUXu/3XqBPWJ5hCU00oUKfXJ+hiXnQf6CPmcPxZ/YGhyfbWRa1Bi w67hHfH/eshbF4pQrznEAcMuMTHaxBIwryZbHPhZR/uCAZ092Ab/N/aJKP23VOWEN+v4 QU6g== 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 :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=y8DHNJBDqoNzbVumm76o8DhCWcdyFEMoqlcjEFabnp8=; b=wkiFxbRar+K84rFprsq5zrPU8GmCDPfOp0jnlhGCgIOFee6a/kTbMhnB9gB9gwEkMd DLIg0O233AqzUaISBh5LT7ULYIVYRyzOxO49rwJ+aDH/8xDvqTYMxC+LHRsrUH/NIW1r Pk5eoF6Iv9NbTbVaUrlYKaU3bojvZ/uu7P+Qwvg9Hwl4eW5ONuaLhRFenkRT5sGJ51n/ ZtNYfXUu+mnZ8KRie284SpTDPWWp424yrfSWZb06hh2Dlb+ZiSlAno4jfCucupeYZu3h icdPHQoDOD5HWrzkiUtUg3oDI9OTpc49eKXL01d4iJplkwXCYIown4Y6+WYCgEDSj/+Z fq7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=edvfkcE6; 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 s9-v6si7932713pgp.163.2018.05.01.09.45.45; Tue, 01 May 2018 09:46:00 -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=edvfkcE6; 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 S1756045AbeEAQou (ORCPT + 99 others); Tue, 1 May 2018 12:44:50 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:34865 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754790AbeEAQot (ORCPT ); Tue, 1 May 2018 12:44:49 -0400 Received: by mail-io0-f194.google.com with SMTP id g1-v6so4936800iob.2 for ; Tue, 01 May 2018 09:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y8DHNJBDqoNzbVumm76o8DhCWcdyFEMoqlcjEFabnp8=; b=edvfkcE6DMXCEN1hXjERFLa7RAlgJPtpjxV5JIUkTpWHgsC9qa6JVIuwM4zbYAWCvj Or4O8YqkBmKeSEukOJj29ISDFP4kbz3FXiFVU9SLxdy1GsiK5gyhd2ZOX/VI57vyd0sq gyOjIKUsZkfO8bjScGH7zA5lcYSKzHcPML71BPT9IIr1+BFgOI5JsaOWkawlVlERdpU3 UP1ybkvw4G2gPZXz0hE4Q3PAkicjOdryHi7Aq2DAqEayidONLfCbhnLf+D3uTOEMvXH5 wczRpoZUTU9pKVLgiA5Rytfb0OsP0sBntCW+KGjORpU0i74skZp5yMygBb+U428OJTJK I0Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y8DHNJBDqoNzbVumm76o8DhCWcdyFEMoqlcjEFabnp8=; b=SHc/Paa4WLvWc8DVrRhsNXPt/WWuJ8xHVF4F4ojPKg3zV6vSXlH1w3TmBzbtAKNb3s YfG+KBVJji6EVL9TvhCJvWRco9h9QUxFVNddiPfZAyweSyN9p5vtOEDJ935r/H27e3ca 5R8ax+G6I1J+a2ALiecg3auDdLJ+9BEI8jSmM5xI1oNFu57XZVEUD7MXi8tanO7Vc1wG yqSomJIQiKos2tUjm2IeOgkadcPDQDNrRLa+awZdSQ06itUbIJU23KEgVmOPh5/+b/sF J3v1+5S4sfAhDs5gz1+yjQPRWeTCqw9PUNL8rpR6SdEPPb8h5Ypb5NQz8piJI6qSgtTd /WSA== X-Gm-Message-State: ALQs6tDgqmQfrSI3XBX8KghUkogfQS1nW26jaJYchsireaNCCn/ux4Cr Ys1YxX3EUROWY31JD/hgTfTtzlP/DwLO7DFt7v0hmA== X-Received: by 2002:a6b:aa54:: with SMTP id t81-v6mr16426569ioe.235.1525193088301; Tue, 01 May 2018 09:44:48 -0700 (PDT) MIME-Version: 1.0 References: <20180501014204.67548-1-joelaf@google.com> <20180501014204.67548-6-joelaf@google.com> <20180501102401.2cac5781@gandalf.local.home> In-Reply-To: <20180501102401.2cac5781@gandalf.local.home> From: Joel Fernandes Date: Tue, 01 May 2018 16:44:37 +0000 Message-ID: Subject: Re: [PATCH RFC v5 5/6] tracepoint: Make rcuidle tracepoint callers use SRCU To: Steven Rostedt Cc: LKML , Peter Zijlstra , Ingo Molnar , Mathieu Desnoyers , Tom Zanussi , Namhyung Kim , Thomas Gleixner , Boqun Feng , Paul McKenney , "Cc: Frederic Weisbecker" , Randy Dunlap , Masami Hiramatsu , Fenguang Wu , 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 Tue, May 1, 2018 at 7:24 AM Steven Rostedt wrote: > On Mon, 30 Apr 2018 18:42:03 -0700 > Joel Fernandes wrote: > > In recent tests with IRQ on/off tracepoints, a large performance > > overhead ~10% is noticed when running hackbench. This is root caused to > > calls to rcu_irq_enter_irqson and rcu_irq_exit_irqson from the > > tracepoint code. Following a long discussion on the list [1] about this, > > we concluded that srcu is a better alternative for use during rcu idle. > > Although it does involve extra barriers, its lighter than the sched-rcu > > version which has to do additional RCU calls to notify RCU idle about > > entry into RCU sections. > > > > In this patch, we change the underlying implementation of the > > trace_*_rcuidle API to use SRCU. This has shown to improve performance > > alot for the high frequency irq enable/disable tracepoints. > Can you post some numbers? Here are some numbers (which I'll also include in the next series spin): With a run of the following 30 times on a single core x86 Qemu instance with 1GB memory: hackbench -g 4 -f 2 -l 3000 Completion times in seconds. CONFIG_PROVE_LOCKING=y. No patches (without this series) Mean: 3.048 Median: 3.025 Std Dev: 0.064 With Lockdep using irq tracepoints with RCU implementation: Mean: 3.451 (-11.66 %) Median: 3.447 (-12.22%) Std Dev: 0.049 With Lockdep using irq tracepoints with SRCU implementation: Mean: 3.020 (I would consider the improvement against the "without this series" case as just noise). Median: 3.013 Std Dev: 0.033 thanks, - Joel