From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753979AbcEDPRo (ORCPT ); Wed, 4 May 2016 11:17:44 -0400 Received: from smtp-out4.electric.net ([192.162.216.183]:61770 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbcEDPRl (ORCPT ); Wed, 4 May 2016 11:17:41 -0400 From: David Laight To: "'Andy Lutomirski'" , Josh Poimboeuf CC: "linux-s390@vger.kernel.org" , Jiri Kosina , Jessica Yu , Vojtech Pavlik , Petr Mladek , Peter Zijlstra , X86 ML , Heiko Carstens , "linux-kernel@vger.kernel.org" , Ingo Molnar , "live-patching@vger.kernel.org" , Jiri Slaby , Miroslav Benes , "linuxppc-dev@lists.ozlabs.org" , "Chris J Arges" Subject: RE: [RFC PATCH v2 05/18] sched: add task flag for preempt IRQ tracking Thread-Topic: [RFC PATCH v2 05/18] sched: add task flag for preempt IRQ tracking Thread-Index: AQHRokHpPykSDugXCkKD4Ab6L/Ubep+hUWWAgAACKoCAAAIigIAAAaOAgAAOxwCAAANUgIAAEb8AgAAYfACABAragIAAIYWAgAAbsgCAAAtpgIADAmyw Date: Wed, 4 May 2016 15:16:31 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D5F4B45CB@AcuExch.aculab.com> References: <20160429201139.pudoged2yathyo64@treble> <20160429202701.yijrohqdsurdxv2a@treble> <20160429212546.t26mvthtvh7543ff@treble> <20160429224112.kl3jlk7ccvfceg2r@treble> <20160502135243.jkbnonaesv7zfios@treble> <20160502173148.zsg6alhknczzozb5@treble> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u44FHslG004957 From: Andy Lutomirski > Sent: 02 May 2016 19:13 ... > I hope your plans include rewriting the current stack unwinder > completely. The thing in print_context_stack is (a) > hard-to-understand and hard-to-modify crap and (b) is called in a loop > from another file using totally ridiculous conventions. I've seen a 'stack unwinder' that parsed the instruction stream forwards looking for 'return' instructions. I fixed it to add a few extra instructions needs to sort out the exit path from hardware interrupts. It only had to understand instructions that modified %sp and %bp and remember which branch instructions and branch targets it had used in order to find the correct exit path from a function. Worked reasonably well without any debug info or guaranteed frame pointers. It did have to fall back on scanning the stack if it was inside an infinite loop. Even on x86 it is reasonably possible to check for 'call' instructions in this case. David