From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Poimboeuf Subject: Re: [patch V2 28/29] stacktrace: Provide common infrastructure Date: Fri, 19 Apr 2019 10:50:44 -0500 Message-ID: <20190419155044.2uch7eaj4vzg47w6@treble> References: <20190418084119.056416939@linutronix.de> <20190418084255.652003111@linutronix.de> <20190418145201.mjzyqbmkjcghqzex@treble> <20190419070211.GL4038@hirez.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: <20190419070211.GL4038@hirez.programming.kicks-ass.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Peter Zijlstra Cc: Mike Snitzer , David Airlie , Catalin Marinas , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, dm-devel@redhat.com, Alexander Potapenko , Christoph Lameter , Christoph Hellwig , Alasdair Kergon , Marek Szyprowski , linux-arch@vger.kernel.org, x86@kernel.org, kasan-dev@googlegroups.com, David Rientjes , Andrey Ryabinin , Alexey Dobriyan , intel-gfx@lists.freedesktop.org, Johannes Thumshirn , Akinobu Mita , Steven Rostedt , Josef Bacik , Mike Rapoport , Andy Lutomirski , David Sterba , Thomas Gleixner List-Id: iommu@lists.linux-foundation.org T24gRnJpLCBBcHIgMTksIDIwMTkgYXQgMDk6MDI6MTFBTSArMDIwMCwgUGV0ZXIgWmlqbHN0cmEg d3JvdGU6Cj4gT24gVGh1LCBBcHIgMTgsIDIwMTkgYXQgMDU6NDI6NTVQTSArMDIwMCwgVGhvbWFz IEdsZWl4bmVyIHdyb3RlOgo+ID4gT24gVGh1LCAxOCBBcHIgMjAxOSwgSm9zaCBQb2ltYm9ldWYg d3JvdGU6Cj4gCj4gPiA+IEFub3RoZXIgaWRlYSBJIGhhZCAoYnV0IG5ldmVyIGdvdCBhIGNoYW5j ZSB0byB3b3JrIG9uKSB3YXMgd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ZGVlZCBlbnRpcmVseSBmZWFzaWJsZSwgaXQgaXMgX2Zhcl8gbW9yZSB3b3JrLgo+IAo+ IFRoZSBjYWxsYmFjayB0aGluZyBPVE9IIGlzIGZsZXhpYmxlIGVub3VnaCB0byBkbyB3aGF0IHdl IHdhbnQgdG8gZG8gbm93LAo+IGFuZCBhbGxvd3MgY29udmVydGluZyBtb3N0IGFyY2hzIHRvIGl0 IHdpdGhvdXQgdG9vIG11Y2ggcGFpbiAoYXMgVGhvbWFzCj4gc2FpZCwgbWFueSBhcmNocyBhcmUg YWxyZWFkeSBpbiB0aGlzIGZvcm0gYW5kIG9ubHkgbmVlZCBtaW5vciBBUEkKPiBhZGp1c3RtZW50 cyksIHdoaWNoIGdldHMgdXMgaW4gYSBmYXIgYmV0dGVyIHBsYWNlIHRoYW4gd2UgYXJlIG5vdy4K PiAKPiBBbmQgd2UgY2FuIGFsd2F5cyBnbyB0byBpdGVyYXRvcnMgbGF0ZXIgb24uIEJ1dCBJIHRo aW5rIGdldHRpbmcgdGhlCj4gZ2VuZXJpYyB1bndpbmRlciBpbXByb3ZlZCBhY3Jvc3MgYWxsIGFy Y2hzIGlzIGEgcmVhbGx5IGltcG9ydGFudCBmaXJzdAo+IHN0ZXAgaGVyZS4KCkZhaXIgZW5vdWdo LgoKLS0gCkpvc2gKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X18KSW50ZWwtZ2Z4IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3Jn Cmh0dHBzOi8vbGlzdHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BC67C282DA for ; Fri, 19 Apr 2019 15:51:17 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0B03A222CE for ; Fri, 19 Apr 2019 15:51:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B03A222CE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B68C1238A; Fri, 19 Apr 2019 15:51:16 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0E462234D for ; Fri, 19 Apr 2019 15:50:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A39C9466 for ; Fri, 19 Apr 2019 15:50:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A13B13076C9E; Fri, 19 Apr 2019 15:50:57 +0000 (UTC) Received: from treble (ovpn-124-190.rdu2.redhat.com [10.10.124.190]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 485F819C58; Fri, 19 Apr 2019 15:50:46 +0000 (UTC) Date: Fri, 19 Apr 2019 10:50:44 -0500 From: Josh Poimboeuf To: Peter Zijlstra Subject: Re: [patch V2 28/29] stacktrace: Provide common infrastructure Message-ID: <20190419155044.2uch7eaj4vzg47w6@treble> References: <20190418084119.056416939@linutronix.de> <20190418084255.652003111@linutronix.de> <20190418145201.mjzyqbmkjcghqzex@treble> <20190419070211.GL4038@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190419070211.GL4038@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 19 Apr 2019 15:50:58 +0000 (UTC) Cc: Mike Snitzer , David Airlie , Catalin Marinas , Joonas Lahtinen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, dm-devel@redhat.com, Alexander Potapenko , Christoph Lameter , Christoph Hellwig , Alasdair Kergon , linux-arch@vger.kernel.org, x86@kernel.org, kasan-dev@googlegroups.com, David Rientjes , Andrey Ryabinin , Alexey Dobriyan , intel-gfx@lists.freedesktop.org, Johannes Thumshirn , Maarten Lankhorst , Akinobu Mita , Steven Rostedt , Josef Bacik , Mike Rapoport , Jani Nikula , Andy Lutomirski , Rodrigo Vivi , David Sterba , Thomas Gleixner , Dmitry Vyukov , Chris Mason , LKML , Pekka Enberg , iommu@lists.linux-foundation.org, Daniel Vetter , Andrew Morton , Robin Murphy , linux-btrfs@vger.kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org Message-ID: <20190419155044.xdk6y0DW-JhNwuF8y56W-SGSuD67rYTrpni2FD_YdGc@z> On Fri, Apr 19, 2019 at 09:02:11AM +0200, Peter Zijlstra wrote: > On Thu, Apr 18, 2019 at 05:42:55PM +0200, Thomas Gleixner wrote: > > On Thu, 18 Apr 2019, Josh Poimboeuf wrote: > > > > Another idea I had (but never got a chance to work on) was to extend the > > > x86 unwind interface to all arches. So instead of the callbacks, each > > > arch would implement something like this API: > > > I surely thought about that, but after staring at all incarnations of > > arch/*/stacktrace.c I just gave up. > > > > Aside of that quite some archs already have callback based unwinders > > because they use them for more than stacktracing and just have a single > > implementation of that loop. > > > > I'm fine either way. We can start with x86 and then let archs convert over > > their stuff, but I wouldn't hold my breath that this will be completed in > > the forseeable future. > > I suggested the same to Thomas early on, and I even spend the time to > convert some $random arch to the iterator interface, and while it is > indeed entirely feasible, it is _far_ more work. > > The callback thing OTOH is flexible enough to do what we want to do now, > and allows converting most archs to it without too much pain (as Thomas > said, many archs are already in this form and only need minor API > adjustments), which gets us in a far better place than we are now. > > And we can always go to iterators later on. But I think getting the > generic unwinder improved across all archs is a really important first > step here. Fair enough. -- Josh _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu