Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-21 Thread Jungseok Lee
On Oct 20, 2015, at 10:08 PM, Jungseok Lee wrote: > On Oct 20, 2015, at 1:18 AM, Catalin Marinas wrote: > > Hi Catalin, > >> On Sat, Oct 17, 2015 at 10:38:16PM +0900, Jungseok Lee wrote: >>> On Oct 17, 2015, at 1:06 AM, Catalin Marinas wrote: BTW, a static allocation (DEFINE_PER_CPU for the

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-20 Thread Jungseok Lee
On Oct 19, 2015, at 3:47 PM, AKASHI Takahiro wrote: > Jungseok, > > On 10/15/2015 10:39 PM, Jungseok Lee wrote: >> On Oct 15, 2015, at 1:19 PM, AKASHI Takahiro wrote: >>> Jungseok, >> > 8< > diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c > index f93aae5..e1

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-20 Thread Jungseok Lee
On Oct 20, 2015, at 1:18 AM, Catalin Marinas wrote: Hi Catalin, > On Sat, Oct 17, 2015 at 10:38:16PM +0900, Jungseok Lee wrote: >> On Oct 17, 2015, at 1:06 AM, Catalin Marinas wrote: >>> BTW, a static allocation (DEFINE_PER_CPU for the whole irq stack) would >>> save us from another stack address

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-19 Thread Catalin Marinas
On Sat, Oct 17, 2015 at 10:38:16PM +0900, Jungseok Lee wrote: > On Oct 17, 2015, at 1:06 AM, Catalin Marinas wrote: > > BTW, a static allocation (DEFINE_PER_CPU for the whole irq stack) would > > save us from another stack address reading on the IRQ entry path. I'm > > not sure exactly where the 16

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-18 Thread AKASHI Takahiro
Jungseok, On 10/15/2015 10:39 PM, Jungseok Lee wrote: On Oct 15, 2015, at 1:19 PM, AKASHI Takahiro wrote: Jungseok, 8< diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index f93aae5..e18be43 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-17 Thread Jungseok Lee
On Oct 17, 2015, at 1:06 AM, Catalin Marinas wrote: Hi Catalin, > On Fri, Oct 16, 2015 at 10:01:20PM +0900, Jungseok Lee wrote: >> On Oct 16, 2015, at 12:59 AM, James Morse wrote: >>> My concern is there could be push-back from the maintainer of >>> kernel/fork.c, saying "define CONFIG_ARCH_THREA

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-16 Thread Catalin Marinas
On Fri, Oct 16, 2015 at 10:01:20PM +0900, Jungseok Lee wrote: > On Oct 16, 2015, at 12:59 AM, James Morse wrote: > > My concern is there could be push-back from the maintainer of > > kernel/fork.c, saying "define CONFIG_ARCH_THREAD_INFO_ALLOCATOR if the > > generic code isn't what you need", and pu

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-16 Thread Jungseok Lee
On Oct 16, 2015, at 1:01 AM, James Morse wrote: > On 15/10/15 15:24, Jungseok Lee wrote: >> On Oct 9, 2015, at 11:24 PM, James Morse wrote: >>> I think unwind_frame() needs to walk the irq stack too. [2] is an example >>> of perf tracing back to userspace, (and there are patches on the list to >>>

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-16 Thread Jungseok Lee
On Oct 16, 2015, at 12:59 AM, James Morse wrote: Hi James, > On 14/10/15 13:12, Jungseok Lee wrote: >> On Oct 14, 2015, at 12:00 AM, Jungseok Lee wrote: >>> On Oct 13, 2015, at 8:00 PM, James Morse wrote: On 12/10/15 23:13, Jungseok Lee wrote: > On Oct 13, 2015, at 1:34 AM, James Morse w

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-15 Thread James Morse
On 15/10/15 15:24, Jungseok Lee wrote: > On Oct 9, 2015, at 11:24 PM, James Morse wrote: >> I think unwind_frame() needs to walk the irq stack too. [2] is an example >> of perf tracing back to userspace, (and there are patches on the list to >> do/fix this), so we need to walk back to the start of

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-15 Thread James Morse
On 14/10/15 13:12, Jungseok Lee wrote: > On Oct 14, 2015, at 12:00 AM, Jungseok Lee wrote: >> On Oct 13, 2015, at 8:00 PM, James Morse wrote: >>> On 12/10/15 23:13, Jungseok Lee wrote: On Oct 13, 2015, at 1:34 AM, James Morse wrote: > Having two kmem_caches for 16K stacks on a 64K page sys

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-15 Thread Jungseok Lee
On Oct 9, 2015, at 11:24 PM, James Morse wrote: Hi James, [ ... ] > I think unwind_frame() needs to walk the irq stack too. [2] is an example > of perf tracing back to userspace, (and there are patches on the list to > do/fix this), so we need to walk back to the start of the first stack for > t

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-15 Thread Jungseok Lee
On Oct 15, 2015, at 1:19 PM, AKASHI Takahiro wrote: > Jungseok, Hi Akashi, > On 10/14/2015 09:55 PM, Jungseok Lee wrote: >> On Oct 14, 2015, at 9:24 PM, Jungseok Lee wrote: >>> On Oct 14, 2015, at 4:13 PM, AKASHI Takahiro wrote: On 10/09/2015 11:24 PM, James Morse wrote: > Hi Jungseok, >

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-14 Thread AKASHI Takahiro
Jungseok, On 10/14/2015 09:55 PM, Jungseok Lee wrote: On Oct 14, 2015, at 9:24 PM, Jungseok Lee wrote: On Oct 14, 2015, at 4:13 PM, AKASHI Takahiro wrote: On 10/09/2015 11:24 PM, James Morse wrote: Hi Jungseok, On 07/10/15 16:28, Jungseok Lee wrote: Currently, a call trace drops a process s

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-14 Thread Jungseok Lee
On Oct 14, 2015, at 9:24 PM, Jungseok Lee wrote: > On Oct 14, 2015, at 4:13 PM, AKASHI Takahiro wrote: >> On 10/09/2015 11:24 PM, James Morse wrote: >>> Hi Jungseok, >>> >>> On 07/10/15 16:28, Jungseok Lee wrote: Currently, a call trace drops a process stack walk when a separate IRQ stac

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-14 Thread Jungseok Lee
On Oct 14, 2015, at 4:13 PM, AKASHI Takahiro wrote: > On 10/09/2015 11:24 PM, James Morse wrote: >> Hi Jungseok, >> >> On 07/10/15 16:28, Jungseok Lee wrote: >>> Currently, a call trace drops a process stack walk when a separate IRQ >>> stack is used. It makes a call trace information much less us

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-14 Thread Jungseok Lee
On Oct 14, 2015, at 12:00 AM, Jungseok Lee wrote: > On Oct 13, 2015, at 8:00 PM, James Morse wrote: >> Hi Jungseok, > > Hi James, > >> On 12/10/15 23:13, Jungseok Lee wrote: >>> On Oct 13, 2015, at 1:34 AM, James Morse wrote: Having two kmem_caches for 16K stacks on a 64K page system may be

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-14 Thread AKASHI Takahiro
On 10/09/2015 11:24 PM, James Morse wrote: Hi Jungseok, On 07/10/15 16:28, Jungseok Lee wrote: Currently, a call trace drops a process stack walk when a separate IRQ stack is used. It makes a call trace information much less useful when a system gets paniked in interrupt context. panicked T

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-13 Thread Jungseok Lee
On Oct 13, 2015, at 8:00 PM, James Morse wrote: > Hi Jungseok, Hi James, > On 12/10/15 23:13, Jungseok Lee wrote: >> On Oct 13, 2015, at 1:34 AM, James Morse wrote: >>> Having two kmem_caches for 16K stacks on a 64K page system may be wasteful >>> (especially for systems with few cpus)… >> >> Th

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-13 Thread James Morse
Hi Jungseok, On 12/10/15 23:13, Jungseok Lee wrote: > On Oct 13, 2015, at 1:34 AM, James Morse wrote: >> Having two kmem_caches for 16K stacks on a 64K page system may be wasteful >> (especially for systems with few cpus)… > > This would be a single concern. To address this issue, I drop the 'sta

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-12 Thread Jungseok Lee
On Oct 13, 2015, at 1:34 AM, James Morse wrote: > Hi Jungseok, Hi James, > On 12/10/15 15:53, Jungseok Lee wrote: >> On Oct 9, 2015, at 11:24 PM, James Morse wrote: >>> I think unwind_frame() needs to walk the irq stack too. [2] is an example >>> of perf tracing back to userspace, (and there are

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-12 Thread James Morse
Hi Jungseok, On 12/10/15 15:53, Jungseok Lee wrote: > On Oct 9, 2015, at 11:24 PM, James Morse wrote: >> I think unwind_frame() needs to walk the irq stack too. [2] is an example >> of perf tracing back to userspace, (and there are patches on the list to >> do/fix this), so we need to walk back to

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-12 Thread Jungseok Lee
On Oct 9, 2015, at 11:24 PM, James Morse wrote: > Hi Jungseok, Hi James, > On 07/10/15 16:28, Jungseok Lee wrote: >> Currently, a call trace drops a process stack walk when a separate IRQ >> stack is used. It makes a call trace information much less useful when >> a system gets paniked in interru

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-09 Thread James Morse
Hi Jungseok, On 07/10/15 16:28, Jungseok Lee wrote: > Currently, a call trace drops a process stack walk when a separate IRQ > stack is used. It makes a call trace information much less useful when > a system gets paniked in interrupt context. panicked > This patch addresses the issue with the f

[PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-07 Thread Jungseok Lee
Currently, a call trace drops a process stack walk when a separate IRQ stack is used. It makes a call trace information much less useful when a system gets paniked in interrupt context. This patch addresses the issue with the following schemes: - Store aborted stack frame data - Decide whethe