linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to print stack uses of IRQ in ARM64
@ 2018-05-31 10:01 Vishnu Motghare
  2018-06-05 13:12 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Vishnu Motghare @ 2018-05-31 10:01 UTC (permalink / raw)
  To: linux-kernel

I found this discussion (https://lwn.net/Articles/657969/) regarding
implementation of separate IRQ stack for  ARM64.

My understanding is each CPU  getting its own IRQ stack. So is it
possible to print the stack uses of each IRQ handler? like, How much
stack is used & how much left free ?

like in process context we have API like stack_not_used(struct
task_struct *p) to get the unused stack  of processes. So, is it
possible to get the similar result for IRQ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to print stack uses of IRQ in ARM64
  2018-05-31 10:01 How to print stack uses of IRQ in ARM64 Vishnu Motghare
@ 2018-06-05 13:12 ` Andy Shevchenko
  2018-06-05 17:40   ` James Morse
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2018-06-05 13:12 UTC (permalink / raw)
  To: Vishnu Motghare; +Cc: Linux Kernel Mailing List, Marc Zyngier

If you would like to get an answer in a reasonable time it might make
sense to Cc: people related to a subject.
I Cc:ed Marc here with hope he is a guy for the topic.

On Thu, May 31, 2018 at 1:01 PM, Vishnu Motghare
<vishnumotghare@gmail.com> wrote:
> I found this discussion (https://lwn.net/Articles/657969/) regarding
> implementation of separate IRQ stack for  ARM64.
>
> My understanding is each CPU  getting its own IRQ stack. So is it
> possible to print the stack uses of each IRQ handler? like, How much
> stack is used & how much left free ?
>
> like in process context we have API like stack_not_used(struct
> task_struct *p) to get the unused stack  of processes. So, is it
> possible to get the similar result for IRQ?



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to print stack uses of IRQ in ARM64
  2018-06-05 13:12 ` Andy Shevchenko
@ 2018-06-05 17:40   ` James Morse
  0 siblings, 0 replies; 4+ messages in thread
From: James Morse @ 2018-06-05 17:40 UTC (permalink / raw)
  To: Vishnu Motghare
  Cc: Andy Shevchenko, Linux Kernel Mailing List, Marc Zyngier,
	linux-arm-kernel

Hi Vishun,

(CC: +linux-arm-kernel list)

On 05/06/18 14:12, Andy Shevchenko wrote:
> On Thu, May 31, 2018 at 1:01 PM, Vishnu Motghare
> <vishnumotghare@gmail.com> wrote:
>> My understanding is each CPU  getting its own IRQ stack. So is it
>> possible to print the stack uses of each IRQ handler?

The stacks are per-cpu not per-handler, so you would get a jumble of different
interrupt-handlers, mixed up with softirq that runs on the same stack.


>> like, How much stack is used & how much left free ?

What would you do with the information?


>> like in process context we have API like stack_not_used(struct
>> task_struct *p) to get the unused stack  of processes.

Isn't this only printed when the process exits?
When would you print it for an irqstack?

To get this information you would need to mask interrupts, then search backwards
on the irq-stack to find the 'last' value. I think it would always be more
useful to take interrupts in that time...


>> So, is it possible to get the similar result for IRQ?

Probably, but I don't think its useful.
If you're debugging a stack-overflow, its much better to use vmap stacks, which
will give you the function and stack trace that triggered the overflow.


Thanks,

James

^ permalink raw reply	[flat|nested] 4+ messages in thread

* How to print stack uses of IRQ in ARM64
@ 2018-05-31 10:07 Vishnu Motghare
  0 siblings, 0 replies; 4+ messages in thread
From: Vishnu Motghare @ 2018-05-31 10:07 UTC (permalink / raw)
  To: linux-kernel

I found this discussion (https://lwn.net/Articles/657969/) regarding
implementation of separate IRQ stack for  ARM64.

My understanding is each CPU  getting its own IRQ stack. So is it
possible to print the stack uses of each IRQ handler? like, How much
stack is used & how much left free ?

like in process context we have API like stack_not_used(struct
task_struct *p) to get the unused stack  of processes. So, is it
possible to get the similar result for IRQ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-05 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-31 10:01 How to print stack uses of IRQ in ARM64 Vishnu Motghare
2018-06-05 13:12 ` Andy Shevchenko
2018-06-05 17:40   ` James Morse
2018-05-31 10:07 Vishnu Motghare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).