From: Peter Zijlstra <peterz@infradead.org>
To: Brian Gerst <brgerst@gmail.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Ingo Molnar <mingo@kernel.org>, "H . Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, Ard Biesheuvel <ardb@kernel.org>,
Uros Bizjak <ubizjak@gmail.com>,
Linus Torvalds <torvalds@linuxfoundation.org>,
Andy Lutomirski <luto@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2 07/11] x86/irq: Move irq stacks to percpu hot section
Date: Wed, 26 Feb 2025 21:25:54 +0100 [thread overview]
Message-ID: <20250226202554.GC29387@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20250226180531.1242429-8-brgerst@gmail.com>
On Wed, Feb 26, 2025 at 01:05:26PM -0500, Brian Gerst wrote:
> diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
> index 474af15ae017..2cd2064457b1 100644
> --- a/arch/x86/kernel/irq.c
> +++ b/arch/x86/kernel/irq.c
> @@ -34,6 +34,11 @@ EXPORT_PER_CPU_SYMBOL(irq_stat);
> DEFINE_PER_CPU_CACHE_HOT(u16, __softirq_pending);
> EXPORT_PER_CPU_SYMBOL(__softirq_pending);
>
> +DEFINE_PER_CPU_CACHE_HOT(struct irq_stack *, hardirq_stack_ptr);
> +#ifdef CONFIG_X86_64
> +DEFINE_PER_CPU_CACHE_HOT(bool, hardirq_stack_inuse);
> +#endif
> +
> atomic_t irq_err_count;
>
> /*
Perhaps instead of the above #ifdef,...
> diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
> index dc1049c01f9b..48a27cde9635 100644
> --- a/arch/x86/kernel/irq_32.c
> +++ b/arch/x86/kernel/irq_32.c
> @@ -52,6 +52,8 @@ static inline int check_stack_overflow(void) { return 0; }
> static inline void print_stack_overflow(void) { }
> #endif
>
> +DEFINE_PER_CPU_CACHE_HOT(struct irq_stack *, softirq_stack_ptr);
> +
> static void call_on_stack(void *func, void *stack)
> {
> asm volatile("xchgl %%ebx,%%esp \n"
> diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
> index 56bdeecd8ee0..4834e317e568 100644
> --- a/arch/x86/kernel/irq_64.c
> +++ b/arch/x86/kernel/irq_64.c
stick it in this file, like you already did for the 32bit case?
next prev parent reply other threads:[~2025-02-26 20:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 18:05 [PATCH v2 00/11] Add a percpu subsection for cache hot data Brian Gerst
2025-02-26 18:05 ` [PATCH v2 01/11] percpu: Introduce percpu hot section Brian Gerst
2025-02-26 19:36 ` Uros Bizjak
2025-02-27 2:09 ` Brian Gerst
2025-02-27 14:16 ` kernel test robot
2025-02-27 19:29 ` kernel test robot
2025-02-26 18:05 ` [PATCH v2 02/11] x86/percpu: Move pcpu_hot to " Brian Gerst
2025-02-26 18:05 ` [PATCH v2 03/11] x86/preempt: Move preempt count " Brian Gerst
2025-02-26 18:05 ` [PATCH v2 04/11] x86/smp: Move cpu number " Brian Gerst
2025-02-26 18:05 ` [PATCH v2 05/11] x86/retbleed: Move call depth " Brian Gerst
2025-02-26 18:05 ` [PATCH v2 06/11] x86/softirq: Move softirq_pending " Brian Gerst
2025-02-26 18:05 ` [PATCH v2 07/11] x86/irq: Move irq stacks " Brian Gerst
2025-02-26 20:25 ` Peter Zijlstra [this message]
2025-02-27 0:10 ` Brian Gerst
2025-02-26 18:05 ` [PATCH v2 08/11] x86/percpu: Move top_of_stack " Brian Gerst
2025-02-26 20:08 ` Uros Bizjak
2025-02-27 2:10 ` Brian Gerst
2025-02-26 18:05 ` [PATCH v2 09/11] x86/percpu: Move current_task " Brian Gerst
2025-02-26 18:05 ` [PATCH v2 10/11] x86/stackprotector: Move __stack_chk_guard " Brian Gerst
2025-02-26 18:05 ` [PATCH v2 11/11] x86/smp: Move this_cpu_off " Brian Gerst
2025-02-26 20:23 ` [PATCH v2 00/11] Add a percpu subsection for cache hot data Peter Zijlstra
2025-02-27 1:29 ` Brian Gerst
2025-02-27 1:52 ` Brian Gerst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250226202554.GC29387@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linuxfoundation.org \
--cc=ubizjak@gmail.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox