Thread (1 message) 1 message, 1 author, 2018-06-05

How to print stack uses of IRQ in ARM64

From: james.morse@arm.com (James Morse)
Date: 2018-06-05 17:43:54
Also in: lkml

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
[off-list ref] wrote:
quoted
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.

quoted
like, How much stack is used & how much left free ?
What would you do with the information?

quoted
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...

quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help