Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751018AbdGMFYu convert rfc822-to-8bit (ORCPT ); Thu, 13 Jul 2017 01:24:50 -0400 Received: from mout.gmx.net ([212.227.17.22]:60701 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbdGMFYs (ORCPT ); Thu, 13 Jul 2017 01:24:48 -0400 Message-ID: <1499923379.5107.61.camel@gmx.de> Subject: Re: [PATCH v3 00/10] x86: ORC unwinder (previously undwarf) From: Mike Galbraith To: Andi Kleen Cc: Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Linus Torvalds , Andy Lutomirski , Jiri Slaby , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra Date: Thu, 13 Jul 2017 07:22:59 +0200 In-Reply-To: <20170713044038.GE3044@two.firstfloor.org> References: <87wp7dmgoo.fsf@firstfloor.org> <1499914980.5107.18.camel@gmx.de> <20170713041524.GC3044@two.firstfloor.org> <1499920123.5107.29.camel@gmx.de> <20170713044038.GE3044@two.firstfloor.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K0:pjrECNsE8hCB9pVMZ8nz4NEve8/NYs+rAW6gofszWlsv6R/6wdx zLIgEiUIa3ToJx8UjVfD4HzaPIvYu9E3N2zBB1aqgFZ0g1OzZL94NWNC2r0QwV17Sf4Tl3M q59UngD6akP8N9+v/BP8bxtKA0tvWi82Mi68BGooXdkosyb8Han9lfgaWrAjzTxJ8Ywhj1D k9CfBytLKQKFo3v/ldD7Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:A5IAzPF0nzM=:vHUwMLfxHxvwqTw4lKSYN1 jTJ0Eo2+tl2Smi0tUSDr3Xgzemeoy2WjL/81QYJJqmVSnkG16UPCciY1G8Grl8QPrfuGNUy3z Fsc47MICbB44v3Sfdb/hwtb59SgsetVtP8ArcGxFaxrR7KVqXLI/RqX+KNtB3NQVd1OF+bIZC exI+u/4b/B+hY9HXb6NeXDQL6yPj7rdT+028ijZ9UIm6MAftj3bNp86hWvmb7H4sisWPUeSwN UD5WLZE2zxSJz7z42we+GPp+NmcSJXBpSCUtC29jJ0+GqY2aT6Nrjm5rM+ZCe9Lu+57cHTAeu oc4ayZvURO2MHWETNQhmymmVOCJH23PzStSM5mfnQYwviSgp/MEQ3VjSmm5ZEMWmoY2Sf13E4 HvVgHB9mImrvgCSs5N30PmYquIa6zK3NWo8RnzylHuMvkCyL5OFXDlCI4KPcTJYCvUZIesG7B l5/nwUifaF87GyxYNLqHiWwWcfkejZvqs5SJRCcZdMj6zek+t/edML6yMdD8Ax5d035CUAGNg Ep2k7TdtSbKh08YA/r6Ti+UVn/D7ITIDDuoh03uqb4a3xRJ+b7xkmLF/Efq/FcUg4W/ABwnd+ L+42JErEvP5XHj7OMR8Du/+4K5Mv+YzT9lpMoDkNLV9B1oeA4oje/dqDwNv4fFYT3OfIeQMNF ooEkIr8bFOKxXJfFgJ8Ookh4Pf19cea6viI2lsazjA2kZuMpRie3P0+1+aB/x+o3rAM7r7AcN r6pdMU9ZTOuKbhoPMEO8KeI4yXP3pbE2ZIrFn/1SfMOPHbepz85MbLL6Nw4NS+qa1xAiYE0sr Fjuu4+A Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2353 Lines: 54 On Wed, 2017-07-12 at 21:40 -0700, Andi Kleen wrote: > On Thu, Jul 13, 2017 at 06:28:43AM +0200, Mike Galbraith wrote: > > On Wed, 2017-07-12 at 21:15 -0700, Andi Kleen wrote: > > > On Thu, Jul 13, 2017 at 05:03:00AM +0200, Mike Galbraith wrote: > > > > On Wed, 2017-07-12 at 15:30 -0700, Andi Kleen wrote: > > > > > Josh Poimboeuf writes: > > > > > > > > > > > > The ORC data format does have a few downsides compared to DWARF. The > > > > > > ORC unwind tables take up ~1MB more memory than DWARF eh_frame tables. > > > > > > > > > > > Can we have an option to just use dwarf instead? For people > > > > > who don't want to waste a MB+ to solve a problem that doesn't > > > > > exist (as proven by many years of opensuse kernel experience) > > > > > > > > Sure the dwarf unwinder works well for crashes, but at the price of > > > > demolishing ftrace/perf utility. > > > > > > You mean the unwind performance? > > > > Yeah, it hurts.. massively, has even been known to kill big boxen. > > Why was that? Presuming you mean the big box bit, danged if I know, I haven't personally met that, only the massive overhead. > > > That's a valid concern, but neither ORC nor dwarf are likely > > > to address it. However most usages of ftrace/perf shouldn't be that > > > depending on unwind performance -- just lower the frequency of your > > > events. > > > > > > The only possible win is if the win from not using FP code is > > > significant enough. On the x86 side the only modern CPUs that should really > > > care about this are Atoms. > > > > Nope, they all care. Measure performance delta of fast/light stuff. > > Well if your test cares that much about function overhead you may want to try > LTO. It can get rid of a lot of functions by doing cross file > inlining. > > https://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git/log/?h=lto-411-2 > > > Maybe I'm expecting too much good stuff to follow, but don't spoil it > > for me, I think I'm looking at a real winner :) > > It's somewhat surprising. It would be good to under stand why that > happens. Is it icache misses, data cache misses for the stack, or > simply more instructions executed, or worse tail calls? No idea.  It was speculated that it was register loss, but I played with that, saw nearly zero delta until I stole too many. -Mike