Received: by 10.192.165.148 with SMTP id m20csp5391492imm; Tue, 1 May 2018 14:15:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqdOj7rT+DPLHcHPj0T/UZdePzsJKXYrVP4lLBxGihAhsre/T6b5jGWRajooYpQJ1rjcDi8 X-Received: by 2002:a17:902:82ca:: with SMTP id u10-v6mr17697742plz.160.1525209342199; Tue, 01 May 2018 14:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525209342; cv=none; d=google.com; s=arc-20160816; b=y16d0q5rA0Lv/xiwTsFiAqE1+FjxXNsPAbg/aLODpNxoFrgHMccbSKH9Vk2uYvTtqx +3Dmn4aDS0O67Dyrl0nSK6UPjWLf/Y8KKYFXXSqKiIEcg9KCaaRD/Db3IDtMtVq07Zzj PE6nAlUP06uwPB9wZD5COF5Jgoo1M3UKkS/8fTML4ulvwgRgkhumWBLOQJpEjIbTc/LN 6+XyEgLuX8J6t1GRV5eEGobzcKgiWmZgEo1tZvGBMSWZ5VLAlvGTHcJt7WuopafxCbcr q1rSZa70Gy5/F8JM/deSK0CN6xzd5rdr7g+DyXoGEC4MQT+tnpzNBsmzfutSiDeomZdn 9kRA== 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=ISsvhzLmvVw5FVgATB0euI3Gf/RKQODq78D1qBqDiRs=; b=HeIB+Py9nfHVG37+J28F/I1EWoImuJqIW2GsI7rHgCmSj+YlN+y1QUN4pYN8UmyHVP LCMSgF026/XCiUwhRUpQQgW5ltb35f/2ZZSeTvaIIxOVPNdGL8cqw7dHntfGG0OOskZM vimSYnjEWYdFESLdlDHfXArA9kZ6oQS3D7Ew5VGuXjQRQ8/olt0QkwSGcXe8m6cg+Vet /Wvx34294ME4d62sohj3BLbhQ4JPJBsEUatJD32RTIPxo7Fbg0PBnDiaghpBmzY0PI2W ZpKcZFWCip4W8Y1qqL9+WZpTFkznIYPJQBBCarsK4AEpiCDtY1gzBxQwZ9YJGmpK96sj FDdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I106lzVN; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si10022888pld.424.2018.05.01.14.15.25; Tue, 01 May 2018 14:15:42 -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=@gmail.com header.s=20161025 header.b=I106lzVN; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751244AbeEAVPR (ORCPT + 99 others); Tue, 1 May 2018 17:15:17 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:51856 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbeEAVPQ (ORCPT ); Tue, 1 May 2018 17:15:16 -0400 Received: by mail-wm0-f47.google.com with SMTP id j4so19506341wme.1 for ; Tue, 01 May 2018 14:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ISsvhzLmvVw5FVgATB0euI3Gf/RKQODq78D1qBqDiRs=; b=I106lzVN6/VZwGJ9VWIcCdArbeP6QnXVxxJWMvAMtkY5dukP5aSNY081NHIvdaGin/ 7GPkBKII5kQiHuAVSlU0l+Zgt1Ie5fb6j01GtYCqNqUsTHc/ZKF9pWag4fEe60bn6a9M MXNr7Q8Tji84Z/It7uko40sB/OjdNsVwysjlhEeg2nXuImANvqGUAxjHpTaWx/BdNG3O u6scwmpSzGqR/VONQ8t6QaPO9WJpamcgSZ+L9OkPWw04R58gcjPwcZpiXwIZZmxi3wlu wq8UXCu+hQLk0WX69Y5l5FpJmBlm75lWKG2kQT0Jy+VsK8HBd8CH+A/g2ob2K2xT4Txo JtIA== 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=ISsvhzLmvVw5FVgATB0euI3Gf/RKQODq78D1qBqDiRs=; b=Ll78dSwqUYqkOdqtSDyAIwzC4acTx83eKAlX5nWZwc6hgbXmZcKwTTlNc3QnI7v1X0 mAlLUkm0sm0Ei2wabbwTEInOTxQBIN9CTgv9BxFJ08uO9CVND4HNSiZQJ0HHpwuyAsGp GbT+IZyhFl5ar2xvGEd1jaGr4U+ctUIPARBfBmL2SGSTmRRFhQtxxf6C673jgOGjEPjO EhqFkulVzztUZpjyZ1aOzg/ThA6LBIe1z1GCVt9m+jmR63mrEUNPWrythqGfh/C+reCn Eoqq0gLqnV+LZtoYDTqeznoj/k1d3bj1pwPCa9WtdC/S+F8DJhB6RlXTRwSLXXWCzumO /FnQ== X-Gm-Message-State: ALQs6tAoMenXj+1Bw02T8IqpgS48SQ2ecxbvBm0eYrTSDCdvcHT1Iy8t BGRkVUZoNNv+oIOLRcHvh58g4C25/21sNpiw8/g= X-Received: by 2002:aa7:c553:: with SMTP id s19-v6mr22633393edr.139.1525209315248; Tue, 01 May 2018 14:15:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.145.91 with HTTP; Tue, 1 May 2018 14:15:14 -0700 (PDT) In-Reply-To: <20180501160059.6df6aae4@gandalf.local.home> References: <20171116161506.19691-1-npiggin@gmail.com> <20180501144620.1e832a09@gandalf.local.home> <20180501191951.GJ12217@hirez.programming.kicks-ass.net> <20180501153840.7281022a@gandalf.local.home> <20180501194838.GK12217@hirez.programming.kicks-ass.net> <20180501160059.6df6aae4@gandalf.local.home> From: Joel Fernandes Date: Tue, 1 May 2018 14:15:14 -0700 Message-ID: Subject: Re: [PATCH] tracing/irqtrace: only call trace_hardirqs_on/off when state changes To: Steven Rostedt Cc: Peter Zijlstra , Nicholas Piggin , Ingo Molnar , Linux Kernel Mailing List 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 1:00 PM, Steven Rostedt wrote: > On Tue, 1 May 2018 21:48:38 +0200 > Peter Zijlstra wrote: > >> On Tue, May 01, 2018 at 03:38:40PM -0400, Steven Rostedt wrote: >> > On Tue, 1 May 2018 21:19:51 +0200 >> > Peter Zijlstra wrote: >> >> > > Now, lockdep only minimally tracks these otherwise redundant operations; >> > > see redundant_hardirqs_{on,off} counters, and loosing that doesn't seen >> > > like a big issue. >> > > >> > > But I'm confused how this helps track superfluous things, it looks like >> > > it explicitly tracks _less_ superfluous transitions. >> > >> > I think it is about triggering on OFF->OFF a warning, as that would >> > only happen if we have: >> > >> > local_irq_save(flags); >> > [..] >> > local_irq_disable(); >> > >> >> Ahh, ok. Yes, that is easier to do with these changes. The alternative >> is to add more information to the tracehooks such that we can do the >> same internally, but whatever. >> >> Yeah, I'm fine with the proposed change, but maybe improve the Changelog >> a little for slow people like me :-) > > Great! > > Nicholas, > > I know this is an old patch (from last November), but want to send it > again with a proper change log and signed off by? I actually wrote the exact same patch yesterday with changes Matsami suggested. However I decided not to send it, since it didn't have any performance improvement (which was the reason I wrote it). Also with my recent set, I don't think it will help detect repeated calls to trace_hardirqs_off because we are handling that recursive case by using per-cpu variable and bailing out if there is a recursion, before even calling into lockdep. I have mixed feelings about this patch, I am Ok with this patch but I suggest its sent with the follow-up patch that shows its use of this. And also appreciate if such a follow-up patch is rebased onto the IRQ tracepoint work: https://patchwork.kernel.org/patch/10373129/ What do you think? thanks, - Joel