Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5219796imb; Thu, 7 Mar 2019 10:19:31 -0800 (PST) X-Google-Smtp-Source: APXvYqy40ktDs/cCskY9DvCgnNIxYkhg5wCDaIf0pdBxOzC72QT4ly9EGONZi5uVBJ3uH9JbMlkU X-Received: by 2002:a63:2bc6:: with SMTP id r189mr12311100pgr.201.1551982771797; Thu, 07 Mar 2019 10:19:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551982771; cv=none; d=google.com; s=arc-20160816; b=JYBg3Obb1/HuBvG7++RfWhAdCBF/ZrvxObu/zigQ6WghTlq+H7jX0NHFKWisI61AYD f+6HdNt3dPXeBKFcQtdF2BQrj9bJ+hRCYX0ctIER7ZNSyGziYYzwTOBnc2jUf+SuPG37 HZAJnw8oPGwSg+q09Ggu9VTerPuI//ul/zMFBPti3S+xRmXKvY3Yxiq0AwMP0yCtSX0i leqz6uxrCu/M7dlXF3aRyz0e/Vd9hu3JBP5HVf4rrwSYZGIuZ7H6z1VrcvPmMmL/E6nc TEfVOIu/Yr/rcd0CZkzLXYRr8jkpV1Xv5mBIwGir8IjxPLZJBoqqLTgvwvNoV8RvG3zz hqag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=SzgwgBr0yvsbNzGkL45RtP3Q3/CkYNh/Ti8Q5jMU9S4=; b=ne6LaJd4S0TB1nWlrwqIP48jJm9GedGuxjk7d7qKlYT6+L8Qo0vMLgrFYYasXaZWHY Oh3dW/zy+5RVkg34sSQGduY1FEKWgGR1NaNd1asC8HPFlUlii2XSEMvp8c4GHpFk10sT hvEW3C5izHqw24xVOHg2szZyjdxmT4kCOgPDScp4s05eT0pzAIEkc+KOGnFIBvedm/u0 bvsAjwirS/96Opb1REHE1R8EJS9x/ntAuKth/x07aSK9iwsQ8gkqBhuTHYh0C0xKJl+5 dAl8iF/k/y7ZFpzXzVEuBOy0lhtPM+XhpknpJ+G21lTAfWS+4KNFDltMAvLtJyMm8FmA QYBw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r12si4196575pgv.293.2019.03.07.10.19.14; Thu, 07 Mar 2019 10:19:31 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726328AbfCGSSp (ORCPT + 99 others); Thu, 7 Mar 2019 13:18:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:36630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbfCGSSp (ORCPT ); Thu, 7 Mar 2019 13:18:45 -0500 Received: from oasis.local.home (unknown [38.98.46.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B8FA020675; Thu, 7 Mar 2019 18:18:43 +0000 (UTC) Date: Thu, 7 Mar 2019 13:18:41 -0500 From: Steven Rostedt To: Linus Torvalds Cc: Peter Zijlstra , Josh Poimboeuf , Thomas Gleixner , Peter Anvin , Julien Thierry , Will Deacon , Andy Lutomirski , Ingo Molnar , Catalin Marinas , James Morse , valentin.schneider@arm.com, Brian Gerst , Andrew Lutomirski , Borislav Petkov , Denys Vlasenko , Linux List Kernel Mailing , Dmitry Vyukov , Slavomir Kaslev Subject: Re: [PATCH 00/20] objtool: UACCESS validation v3 Message-ID: <20190307131841.3b5d9e00@oasis.local.home> In-Reply-To: References: <20190307114511.870090179@infradead.org> <20190307120317.GD32477@hirez.programming.kicks-ass.net> <20190307125526.GB32534@hirez.programming.kicks-ass.net> <20190307131312.GC32534@hirez.programming.kicks-ass.net> <20190307164705.qbu4ytdfdmsighas@treble> <20190307171709.dap5hfeof4yo3nsc@treble> <20190307173810.GI32477@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 Mar 2019 09:45:35 -0800 Linus Torvalds wrote: > On Thu, Mar 7, 2019 at 9:38 AM Peter Zijlstra wrote: > > > > Also; it seems to me that something PT, or maybe even simply: > > > > perf -e branches -e branch-misses > > > > would get you similar or sufficient information. > > Yeah, I'm not really seeing a lot of upside to PROFILE_ALL_BRANCHES. > > Particularly since it doesn't actually profile all branches at all. It > only basically profiles "if ()" statements, which obviously misses > loops etc, but then also _does_ hit things where people turned loops > into "if (unlikely()) loop()", which happens in (for example) > low-level locking code etc that often has a fast-case "first try" > thing followed by a slow-case "ok, let's loop for it" thing. > > So I think PROFILE_ALL_BRANCHES tends to have very random coverage. > I'd love to get rid of it, because it seems so random. > As Josh said, I run it once a year on two production (real use) machines for 2 to 4 weeks and collect the data to see if there are places that can be optimized better. I currently have one of my engineers looking at the data and may be sending patches soon. It's basically an entry level way to get into kernel development. Note, no patch will be sent just because of the data from the profiling. The task is to look at and understand the code, and see if it can be optimized (with likely/unlikely or flow changes). It's a way to get a better understanding of the kernel in various locations. It is by no means "profiler said this, lets change it." All changes must be rational, and make sense. The profiler is only used to help find those places. The data that was run at the end of January can be found here: http://rostedt.homelinux.com/branches/mammoth-branches-2019/ http://rostedt.homelinux.com/branches/gandalf-branches-2019/ -- Steve