Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220326

Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts.

From Jungseok Lee <jungseoklee85@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts.
Date 2015-09-07 18:40 +0200
Message-ID <q67Cy-2zb-17@gated-at.bofh.it> (permalink)
References <q65Kq-8kq-19@gated-at.bofh.it> <q65Kq-8kq-17@gated-at.bofh.it> <q66Qa-1px-21@gated-at.bofh.it> <q679v-21p-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sep 8, 2015, at 1:06 AM, James Morse wrote:
> On 07/09/15 16:48, Jungseok Lee wrote:
>> On Sep 7, 2015, at 11:36 PM, James Morse wrote:
>> 
>> Hi James,
>> 
>>> Having to handle interrupts on top of an existing kernel stack means the
>>> kernel stack must be large enough to accomodate both the maximum kernel
>>> usage, and the maximum irq handler usage. Switching to a different stack
>>> when processing irqs allows us to make the stack size smaller.
>>> 
>>> Maximum kernel stack usage (running ltp and generating usb+ethernet
>>> interrupts) was 7256 bytes. With this patch, the same workload gives
>>> a maximum stack usage of 5816 bytes.
>> 
>> I'd like to know how to measure the max stack depth.
>> AFAIK, a stack tracer on ftrace does not work well. Did you dump a stack
>> region and find or track down an untouched region? 
> 
> I enabled the 'Trace max stack' option under menuconfig 'Kernel Hacking' ->
> 'Tracers', then looked in debugfs:/tracing/stack_max_size.
> 
> What problems did you encounter?
> (I may be missing something…)

When I enabled the feature, all entries had *0* size except the last entry.
It can be reproduced easily as looking in debugs:/tracing/stack_trace.

You can track down my report and Akashi's changes with the following links:
- http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/354126.html
- https://lkml.org/lkml/2015/7/13/29

Although it is impossible to measure an exact depth at this moment, the feature
could be utilized to check improvement.

Cc'ing Akashi for additional comments if needed.

Best Regards
Jungseok Lee--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] arm64: kernel: Use a separate stack for irq interrupts. James Morse <james.morse@arm.com> - 2015-09-07 16:40 +0200
  Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-07 17:50 +0200
    Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. James Morse <james.morse@arm.com> - 2015-09-07 18:10 +0200
      Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-07 18:40 +0200
        Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. AKASHI Takahiro <takahiro.akashi@linaro.org> - 2015-09-08 03:50 +0200
          Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. AKASHI Takahiro <takahiro.akashi@linaro.org> - 2015-09-08 08:50 +0200
          Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-08 17:00 +0200
  Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. AKASHI Takahiro <takahiro.akashi@linaro.org> - 2015-09-08 10:00 +0200
  Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-08 17:00 +0200
    Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. James Morse <james.morse@arm.com> - 2015-09-08 18:50 +0200
      Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-09 15:30 +0200
        Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. James Morse <james.morse@arm.com> - 2015-09-09 20:20 +0200
          Re: [PATCH] arm64: kernel: Use a separate stack for irq interrupts. Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-11 01:40 +0200

csiph-web