From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751628AbcFWSbh (ORCPT ); Thu, 23 Jun 2016 14:31:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57785 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbcFWSbf (ORCPT ); Thu, 23 Jun 2016 14:31:35 -0400 Date: Thu, 23 Jun 2016 13:31:32 -0500 From: Josh Poimboeuf To: Andy Lutomirski Cc: Jiri Kosina , Ingo Molnar , X86 ML , Heiko Carstens , "linux-s390@vger.kernel.org" , live-patching@vger.kernel.org, Michael Ellerman , Chris J Arges , Jessica Yu , linuxppc-dev@lists.ozlabs.org, Petr Mladek , Jiri Slaby , "linux-kernel@vger.kernel.org" , Vojtech Pavlik , Miroslav Benes , Peter Zijlstra Subject: Re: [RFC PATCH v2 05/18] sched: add task flag for preempt IRQ tracking Message-ID: <20160623183132.oqtl6flnoqtilurs@treble> References: <20160524022805.sazm456jorfqvdr7@treble> <20160622163011.4fjwalehrzk4a32t@treble> <20160622182245.4u72jgjg2khxracz@treble> <20160622184042.br7ov37pl6eydr3y@treble> <20160623161950.ovwpvhq43tq35u7k@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 23 Jun 2016 18:31:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 23, 2016 at 09:35:29AM -0700, Andy Lutomirski wrote: > > So which is the least-bad option? To summarize: > > > > 1) task flag(s) for preemption and page faults > > > > 2) turn pt_regs into a stack frame > > > > 3) annotate all calls from entry code in a table > > > > 4) encode rbp on entry > > > > They all have their issues, though I'm partial to #2. > > > > Any more hare-brained ideas? :-) > > I'll try to take a closer look at #2 and see just how much I dislike > all the stack frame munging. Ok. > Also, in principle, it's only the > sleeping calls and the calls that make it into real (non-entry) kernel > code that really want to be unwindable through this mechanism. Yeah, that's true. We could modify options 2 or 3 to be less absolute. Though I think that makes them more prone to future breakage. > FWIW, I don't care that much about preserving gdb's partial ability to > unwind through pt_regs, especially because gdb really ought to be able > to use DWARF, too. Hm, that's a good point. I really don't know if there are any other external tools out there that would care. Maybe we could try option 4 and then see if anybody complains. -- Josh