[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tuqq8sr3.fsf@nanos.tec.linutronix.de>
Date: Fri, 05 Feb 2021 16:00:00 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Josh Poimboeuf <jpoimboe@...hat.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [patch 03/12] x86/irq/64: Adjust the per CPU irq stack pointer by 8
On Fri, Feb 05 2021 at 14:53, Peter Zijlstra wrote:
> On Thu, Feb 04, 2021 at 09:49:06PM +0100, Thomas Gleixner wrote:
>> Move the definition
>> next to the inuse flag so they end up in the same cache line.
>
>> -DEFINE_PER_CPU(struct irq_stack *, hardirq_stack_ptr);
>> +DEFINE_PER_CPU(void *, hardirq_stack_ptr);
>> DEFINE_PER_CPU(bool, hardirq_stack_inuse);
>
> Not strictly guaranteed they end up in the same line. If you stick them
> in a struct and force alignment on the instance you'll have better
> guarantees.
You're right. There are a bunch of per cpu variables which are randomly
defined all over the place which should stay in the same cache line.
Powered by blists - more mailing lists