[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170725091059.a2et5mhz7ytrhv6y@gmail.com>
Date: Tue, 25 Jul 2017 11:10:59 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
live-patching@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>, Jiri Slaby <jslaby@...e.cz>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Mike Galbraith <efault@....de>
Subject: Re: [PATCH v4 2/2] x86/kconfig: make it easier to switch to the new
ORC unwinder
* Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> A couple of Kconfig changes which make it much easier to switch to the
> new CONFIG_ORC_UNWINDER:
>
> 1) Remove x86 dependencies on CONFIG_FRAME_POINTER for lockdep,
> latencytop, and fault injection. x86 has a 'guess' unwinder which
> just scans the stack for kernel text addresses. It's not 100%
> accurate but in many cases it's good enough. This allows those users
> who don't want the text overhead of the frame pointer or ORC
> unwinders to still use these features. More importantly, this also
> makes it much more straightforward to disable frame pointers.
>
> 2) Make CONFIG_ORC_UNWINDER depend on !CONFIG_FRAME_POINTER. While it
> would be possible to have both enabled, it doesn't really make sense
> to do so. So enforce a sane configuration to prevent the user from
> making a dumb mistake.
>
> With these changes, when you disable CONFIG_FRAME_POINTER, "make
> oldconfig" will ask if you want to enable CONFIG_ORC_UNWINDER.
Yeah, so I think this is still suboptimal: the frame pointer and the Orc unwinders
are configured in different places, and the user won't know about the various
unwinder options unless stumbling across them by accidentally disabling frame
pointers ...
Also, the Kconfig help text for frame pointers is now actively misleading:
CONFIG_FRAME_POINTER:
If you say Y here the resulting kernel image will be slightly
larger and slower, but it gives very useful debugging information
in case of kernel bugs. (precise oopses/stacktraces/warnings)
Please, as I suggested it before, make it a multiple choice option: frame, Orc, or
the guess unwinder.
I'd only offer the 'guess' unwinder if EXPERT is selected, because it's a really
sub-optimal selection all things considered.
Once things are tested and it's all rosy we can change the default x86 unwinder to
Orc and organize the naming of the config variables to:
CONFIG_UNWINDER_ORC
CONFIG_UNWINDER_FRAME_POINTER
CONFIG_UNWINDER_GUESS
Thanks,
Ingo
Powered by blists - more mailing lists