All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/4] arm64: Add support for IRQ stack
@ 2015-12-04 11:02 James Morse
  2015-12-04 11:02 ` [PATCH v8 1/4] arm64: Store struct task_info in sp_el0 James Morse
                   ` (8 more replies)
  0 siblings, 9 replies; 44+ messages in thread
From: James Morse @ 2015-12-04 11:02 UTC (permalink / raw)
  To: linux-arm-kernel

This consolidated series adds a per-cpu irq_stack, which will eventually allow
us to reduce the size of task stacks.

Code in entry.S switches to the per-cpu irq_stack when irq_count is zero.
This counter is updated in do_softirq_own_stack(), which is called before
__do_softirq() re-enables interrupts, which could cause recursive use of the
irq stack.

sp_el0 is used as a scratch register to store struct thread_info during el1
execution, this means code to find it by masking the stack pointer no longer
needs to be inlined. This also lets us remove the alignment requirements for
the irq stack, (task stacks still need to be naturally aligned).

Patch 2 is a combination of Akashi Takahiro's 'arm64: unwind_frame for
interrupt stack' and 'arm64: fix dump_backtrace() to show correct pt_regs at
interrupt', both of which need to be present before irq_stack is enabled in
Patch 3.

Patch 4 is new, following Catalin's comments, but I don't think it is
necessary unless we also decrease the stack size, which I don't think we
should do immediatly - it would be good to collect some max_stack_size values
for various workloads first.

This series is based on the v4.4-rc3
The series can be pulled from git://linux-arm.org/linux-jm.git -b irq_stack/v8

Comments welcome,


James

Changes since v7 [0]:
 * Removed independent irq_stack_ptr and irq_count values. The lowest irq_stack
   value is used as irq_count, irq_stack_entry adds IRQ_STACK_START_SP to this
   when switching stack.
 * Moved irq_stack definition from patch 1 to patch 2.
 * Added patch 4

Changes since v6 [1]:
 * Add irq_count and do_softirq_own_stack().
 * Removed requirement that the irq_stack is naturally aligned.
 * Made irq_stack per_cpu regardless of page size.


[0] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-November/385337.html
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-November/382238.html


AKASHI Takahiro (1):
  arm64: Modify stack trace and dump for use with irq_stack

James Morse (2):
  arm64: Add do_softirq_own_stack() and enable irq_stacks
  arm64: switch to irq_stack during softirq

Jungseok Lee (1):
  arm64: Store struct task_info in sp_el0

 arch/arm64/include/asm/irq.h         | 36 ++++++++++++++++
 arch/arm64/include/asm/thread_info.h | 10 ++++-
 arch/arm64/kernel/entry.S            | 82 +++++++++++++++++++++++++++++++++---
 arch/arm64/kernel/head.S             |  5 +++
 arch/arm64/kernel/irq.c              | 37 ++++++++++++++++
 arch/arm64/kernel/sleep.S            |  3 ++
 arch/arm64/kernel/stacktrace.c       | 29 ++++++++++++-
 arch/arm64/kernel/traps.c            | 14 +++++-
 8 files changed, 206 insertions(+), 10 deletions(-)

-- 
2.6.2

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

end of thread, other threads:[~2015-12-21 14:06 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 11:02 [PATCH v8 0/4] arm64: Add support for IRQ stack James Morse
2015-12-04 11:02 ` [PATCH v8 1/4] arm64: Store struct task_info in sp_el0 James Morse
2015-12-04 13:27   ` Catalin Marinas
2015-12-04 14:55     ` James Morse
2015-12-04 16:18       ` Catalin Marinas
2015-12-06 13:15     ` Jungseok Lee
2015-12-04 11:02 ` [PATCH v8 2/4] arm64: Modify stack trace and dump for use with irq_stack James Morse
2015-12-04 12:21   ` Jungseok Lee
2015-12-04 14:31   ` Catalin Marinas
2015-12-04 11:02 ` [PATCH v8 3/4] arm64: Add do_softirq_own_stack() and enable irq_stacks James Morse
2015-12-04 13:46   ` Catalin Marinas
2015-12-04 13:47     ` Catalin Marinas
2015-12-07 22:48   ` Catalin Marinas
2015-12-08 11:43     ` Will Deacon
2015-12-08 16:02       ` Jungseok Lee
2015-12-08 17:23         ` James Morse
2015-12-08 17:27           ` Will Deacon
2015-12-08 23:13           ` Jungseok Lee
2015-12-09  9:47           ` James Morse
2015-12-09 11:38             ` Will Deacon
2015-12-09 13:45   ` Will Deacon
2015-12-09 14:36     ` James Morse
2015-12-04 11:02 ` [PATCH v8 4/4] arm64: switch to irq_stack during softirq James Morse
2015-12-04 14:01   ` Catalin Marinas
2015-12-04 14:39     ` James Morse
2015-12-04 18:40       ` Catalin Marinas
2015-12-08 10:29         ` James Morse
2015-12-06 13:51       ` Jungseok Lee
2015-12-04 12:17 ` [PATCH v8 0/4] arm64: Add support for IRQ stack Jungseok Lee
2015-12-06 13:56   ` Jungseok Lee
2015-12-04 13:57 ` Catalin Marinas
2015-12-06 13:33   ` Jungseok Lee
2015-12-10 10:22 ` [PATCH v8 5/4] arm64: Fix off-by-one in stack tracing when stepping off irq stack James Morse
2015-12-10 10:22   ` [PATCH v8 6/4] arm64: Add this_cpu_ptr() assembler macro for use in entry.S James Morse
2015-12-10 10:22   ` [PATCH v8 7/4] arm64: when walking onto the task stack, check sp & fp are in current->stack James Morse
2015-12-10 10:22   ` [PATCH v8 8/4] arm64: don't call C code with el0's fp register James Morse
2015-12-10 14:03   ` [PATCH v8 5/4] arm64: Fix off-by-one in stack tracing when stepping off irq stack Jungseok Lee
2015-12-15 11:21 ` [PATCH v8 9/4] arm64: reduce stack use in irq_handler James Morse
2015-12-18 16:01 ` [PATCH v8 9/4] arm64: remove irq_count and do_softirq_own_stack() James Morse
2015-12-20 11:07   ` Jungseok Lee
2015-12-21 11:30     ` Will Deacon
2015-12-21 12:19       ` James Morse
2015-12-21 12:21         ` Will Deacon
2015-12-21 14:06           ` Jungseok Lee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.