Re: [PATCH V4 6/8] riscv: Support HAVE_IRQ_EXIT_ON_IRQ_STACK

Sebastian Andrzej Siewior
2022-09-08T16:08:39Z

On 2022-09-07 22:25:04 [-0400], guoren@kernel.org wrote:
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index a07bb3b73b5b..a8a12b4ba1a9 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -433,6 +433,14 @@ config FPU
>
> If you don't know what to do here, say Y.
>
> +config IRQ_STACKS
> + bool "Independent irq stacks"
> + default y
> + select HAVE_IRQ_EXIT_ON_IRQ_STACK
> + help
> + Add independent irq stacks for percpu to prevent kernel stack overflows.
> + We may save some memory footprint by disabling IRQ_STACKS.

Do you really think that it is needed to save memory here? Avoiding
stack overflows in deep call chains is probably more important than
saving ~8KiB per CPU.

Sebastian