* dwarf unwinder question
@ 2015-11-23 13:03 Vineet Gupta
2015-11-23 13:15 ` Jan Beulich
0 siblings, 1 reply; 4+ messages in thread
From: Vineet Gupta @ 2015-11-23 13:03 UTC (permalink / raw)
To: Jan Beulich; +Cc: lkml, arcml, Peter Zijlstra
Hi Jan,
ARC port has kernel dwarf unwinder shamelessly copied from your original code
which existed in tree at the time (circa 2008)
I was wondering if u could answer a question in that respect: arch/arc/kernel/unwind.c
If the binary search for a PC fails, it resorts to linear search, which for our
case was taking 3 million cycles (vs. normal ~2000).
Do you remember why this linear search step was needed - after all the binary
lookup table is created out of early parsing of the same data.
The fail scenario is for hand asm symbols lacking gcc generated dwarf info and we
don't have yet the CFI pseudo ops support in assembler.
I can fix memset etc to have empty dwarf info, still unwinder needs this fixing.
In case of perf, an overflow interrupt in hand optimized memset leads into the
unwinder slow path linear search which causes RCU stalls and such.
I'm going to remove it but was wondering if u could provide some historic background.
TIA,
-Vineet
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dwarf unwinder question
2015-11-23 13:03 dwarf unwinder question Vineet Gupta
@ 2015-11-23 13:15 ` Jan Beulich
2015-11-23 13:27 ` Vineet Gupta
0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2015-11-23 13:15 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Peter Zijlstra, arcml, lkml
>>> On 23.11.15 at 14:03, <Vineet.Gupta1@synopsys.com> wrote:
> I was wondering if u could answer a question in that respect:
> arch/arc/kernel/unwind.c
>
> If the binary search for a PC fails, it resorts to linear search, which for
> our
> case was taking 3 million cycles (vs. normal ~2000).
> Do you remember why this linear search step was needed - after all the binary
> lookup table is created out of early parsing of the same data.
>
> The fail scenario is for hand asm symbols lacking gcc generated dwarf info
> and we
> don't have yet the CFI pseudo ops support in assembler.
> I can fix memset etc to have empty dwarf info, still unwinder needs this
> fixing.
>
> In case of perf, an overflow interrupt in hand optimized memset leads into
> the
> unwinder slow path linear search which causes RCU stalls and such.
> I'm going to remove it but was wondering if u could provide some historic
> background.
Iirc there was no binary lookup at all originally. When it got added,
it seemed odd to remove the linear lookup altogether (want to keep
it at least for the case where the binary lookup table couldn't be
built for whatever reason), and code structure seemed most
reasonable to simply do one after the other instead of just either.
I'm pretty sure the linear lookup could be skipped if you're sure the
binary lookup table is correct and complete.
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dwarf unwinder question
2015-11-23 13:15 ` Jan Beulich
@ 2015-11-23 13:27 ` Vineet Gupta
2015-11-23 13:42 ` Jan Beulich
0 siblings, 1 reply; 4+ messages in thread
From: Vineet Gupta @ 2015-11-23 13:27 UTC (permalink / raw)
To: Jan Beulich; +Cc: Peter Zijlstra, arcml, lkml
On Monday 23 November 2015 06:45 PM, Jan Beulich wrote:
>>>> On 23.11.15 at 14:03, <Vineet.Gupta1@synopsys.com> wrote:
>> I was wondering if u could answer a question in that respect:
>> arch/arc/kernel/unwind.c
>>
>> If the binary search for a PC fails, it resorts to linear search, which for
>> our
>> case was taking 3 million cycles (vs. normal ~2000).
>> Do you remember why this linear search step was needed - after all the binary
>> lookup table is created out of early parsing of the same data.
>>
>> The fail scenario is for hand asm symbols lacking gcc generated dwarf info
>> and we
>> don't have yet the CFI pseudo ops support in assembler.
>> I can fix memset etc to have empty dwarf info, still unwinder needs this
>> fixing.
>>
>> In case of perf, an overflow interrupt in hand optimized memset leads into
>> the
>> unwinder slow path linear search which causes RCU stalls and such.
>> I'm going to remove it but was wondering if u could provide some historic
>> background.
> Iirc there was no binary lookup at all originally. When it got added,
> it seemed odd to remove the linear lookup altogether (want to keep
> it at least for the case where the binary lookup table couldn't be
> built for whatever reason), and code structure seemed most
> reasonable to simply do one after the other instead of just either.
> I'm pretty sure the linear lookup could be skipped if you're sure the
> binary lookup table is correct and complete.
>
> Jan
Thx for quick reply. I'll remove the linear search as part of many other tweaks to
speed it up - we can elide a lot of general dwarf checks / rechecks - given that
it is used only for kernel unwinding (not user space).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dwarf unwinder question
2015-11-23 13:27 ` Vineet Gupta
@ 2015-11-23 13:42 ` Jan Beulich
0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2015-11-23 13:42 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Peter Zijlstra, arcml, lkml
>>> On 23.11.15 at 14:27, <Vineet.Gupta1@synopsys.com> wrote:
> On Monday 23 November 2015 06:45 PM, Jan Beulich wrote:
>>>>> On 23.11.15 at 14:03, <Vineet.Gupta1@synopsys.com> wrote:
>>> I was wondering if u could answer a question in that respect:
>>> arch/arc/kernel/unwind.c
>>>
>>> If the binary search for a PC fails, it resorts to linear search, which for
>>> our
>>> case was taking 3 million cycles (vs. normal ~2000).
>>> Do you remember why this linear search step was needed - after all the binary
>>> lookup table is created out of early parsing of the same data.
>>>
>>> The fail scenario is for hand asm symbols lacking gcc generated dwarf info
>>> and we
>>> don't have yet the CFI pseudo ops support in assembler.
>>> I can fix memset etc to have empty dwarf info, still unwinder needs this
>>> fixing.
>>>
>>> In case of perf, an overflow interrupt in hand optimized memset leads into
>>> the
>>> unwinder slow path linear search which causes RCU stalls and such.
>>> I'm going to remove it but was wondering if u could provide some historic
>>> background.
>> Iirc there was no binary lookup at all originally. When it got added,
>> it seemed odd to remove the linear lookup altogether (want to keep
>> it at least for the case where the binary lookup table couldn't be
>> built for whatever reason), and code structure seemed most
>> reasonable to simply do one after the other instead of just either.
>> I'm pretty sure the linear lookup could be skipped if you're sure the
>> binary lookup table is correct and complete.
>
> Thx for quick reply. I'll remove the linear search as part of many other
> tweaks to
> speed it up - we can elide a lot of general dwarf checks / rechecks - given
> that
> it is used only for kernel unwinding (not user space).
Don't tell Linus if you're removing any checks...
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-23 13:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-23 13:03 dwarf unwinder question Vineet Gupta
2015-11-23 13:15 ` Jan Beulich
2015-11-23 13:27 ` Vineet Gupta
2015-11-23 13:42 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®