From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [patch V2 28/29] stacktrace: Provide common infrastructure Date: Fri, 19 Apr 2019 09:02:11 +0200 Message-ID: <20190419070211.GL4038@hirez.programming.kicks-ass.net> References: <20190418084119.056416939@linutronix.de> <20190418084255.652003111@linutronix.de> <20190418145201.mjzyqbmkjcghqzex@treble> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Thomas Gleixner 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 , Josh Poimboeuf , David Sterba List-Id: iommu@lists.linux-foundation.org T24gVGh1LCBBcHIgMTgsIDIwMTkgYXQgMDU6NDI6NTVQTSArMDIwMCwgVGhvbWFzIEdsZWl4bmVy IHdyb3RlOgo+IE9uIFRodSwgMTggQXByIDIwMTksIEpvc2ggUG9pbWJvZXVmIHdyb3RlOgoKPiA+ IEFub3RoZXIgaWRlYSBJIGhhZCAoYnV0IG5ldmVyIGdvdCBhIGNoYW5jZSB0byB3b3JrIG9uKSB3 YXMgdG8gZXh0ZW5kIHRoZQo+ID4geDg2IHVud2luZCBpbnRlcmZhY2UgdG8gYWxsIGFyY2hlcy4g IFNvIGluc3RlYWQgb2YgdGhlIGNhbGxiYWNrcywgZWFjaAo+ID4gYXJjaCB3b3VsZCBpbXBsZW1l bnQgc29tZ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c3QgYXJjaHMgdG8g aXQgd2l0aG91dCB0b28gbXVjaCBwYWluIChhcyBUaG9tYXMKc2FpZCwgbWFueSBhcmNocyBhcmUg YWxyZWFkeSBpbiB0aGlzIGZvcm0gYW5kIG9ubHkgbmVlZCBtaW5vciBBUEkKYWRqdXN0bWVudHMp LCB3aGljaCBnZXRzIHVzIGluIGEgZmFyIGJldHRlciBwbGFjZSB0aGFuIHdlIGFyZSBub3cuCgpB bmQgd2UgY2FuIGFsd2F5cyBnbyB0byBpdGVyYXRvcnMgbGF0ZXIgb24uIEJ1dCBJIHRoaW5rIGdl dHRpbmcgdGhlCmdlbmVyaWMgdW53aW5kZXIgaW1wcm92ZWQgYWNyb3NzIGFsbCBhcmNocyBpcyBh IHJlYWxseSBpbXBvcnRhbnQgZmlyc3QKc3RlcCBoZXJlLgpfX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fXwpJbnRlbC1nZnggbWFpbGluZyBsaXN0CkludGVsLWdm eEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5mcmVlZGVza3RvcC5vcmcvbWFp bG1hbi9saXN0aW5mby9pbnRlbC1nZng= 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=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT 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 767B7C282DA for ; Fri, 19 Apr 2019 07:03:01 +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 40863217FA for ; Fri, 19 Apr 2019 07:03:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="i1Hy/GRW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40863217FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org 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 F0E0921B3; Fri, 19 Apr 2019 07:03:00 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 519FA2140 for ; Fri, 19 Apr 2019 07:02:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 0CAFF14D for ; Fri, 19 Apr 2019 07:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=L7eq8Aug6+D0Uzgmn7vgZITr6hThHMPewFsEW47cNZg=; b=i1Hy/GRW9HiWiapoFoRTCdgu1 cUt7Er7sr71bgd43+dYv+n0Lv5GqnvJ+fSpYP2kjtQcZK4KSH9eqZMuPMywNyKvmhH64/AJZF28Kd AlhoxD9/xO4V7UsOg/7MAE2EeVnrnoWM0Pi7ybOHHUHP44EMSsIwE6Jwu+NXpJ/AgQnIsAxNgPdAJ Ota/ejkQQY1W48qZZdy3Q4RNzTzjM7hk86diK53SIfg/s2qF6MI2J0OScfSmfawFdDLDzngU6/tDG 13MF/x52A68J+MK67YWX2NX2H2bIpQcWWr4GQXNqFjTBedeNIaoV6M4g88Nvr+yKVzWJBaI25hvyv 9aVlwsorw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHNXI-00007w-SC; Fri, 19 Apr 2019 07:02:13 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5B5DB29B52F42; Fri, 19 Apr 2019 09:02:11 +0200 (CEST) Date: Fri, 19 Apr 2019 09:02:11 +0200 From: Peter Zijlstra To: Thomas Gleixner Subject: Re: [patch V2 28/29] stacktrace: Provide common infrastructure Message-ID: <20190419070211.GL4038@hirez.programming.kicks-ass.net> References: <20190418084119.056416939@linutronix.de> <20190418084255.652003111@linutronix.de> <20190418145201.mjzyqbmkjcghqzex@treble> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 , Rodrigo Vivi , Mike Rapoport , Jani Nikula , Andy Lutomirski , Josh Poimboeuf , David Sterba , 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: <20190419070211.sxTsH279rQrtr7ECXNJlUl_JGdGlSi55BvHg8QlPjOE@z> 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. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu