Re: w/r/t "irq & spin_lock: Add counted interrupt disabling/enabling": holes in pcpu_hot?
From: Thomas Gleixner
Date: Thu Jul 24 2025 - 18:00:05 EST
On Thu, Jul 24 2025 at 16:36, Lyude Paul wrote:
> Hey! Sorry to be a bit late here but I just noticed this comment in your email
> that I didn't before
>
> On Wed, 2024-10-23 at 21:51 +0200, Peter Zijlstra wrote:
>> We still have a few holes in pcpu_hot iirc.
>
> I assume you mean we still have space for adding things into pcpu_hot? And if
> so, where exactly are these holes? At some point when working on this series I
> attempted adding a single unsigned long to pcpu_hot and the build failed as a
> result of not having enough space. But if there's somewhere we can add
> something else, that might actually help with a few of the issues in this
> patch series
That's the current lot we have.
ffffffff82f6a000 D __per_cpu_hot_start
ffffffff82f6a000 D hardirq_stack_ptr
ffffffff82f6a008 D __ref_stack_chk_guard
ffffffff82f6a008 D __stack_chk_guard
ffffffff82f6a010 D const_cpu_current_top_of_stack
ffffffff82f6a010 D cpu_current_top_of_stack
ffffffff82f6a018 D const_current_task
ffffffff82f6a018 D current_task
ffffffff82f6a020 D __x86_call_depth
ffffffff82f6a028 D this_cpu_off
ffffffff82f6a030 D __preempt_count
ffffffff82f6a034 D cpu_number
ffffffff82f6a038 D __softirq_pending
ffffffff82f6a03a D hardirq_stack_inuse
ffffffff82f6a03b D __per_cpu_hot_end
So there is a 5 byte hole there at the end, which is obviously too small
for an unsigned long on 64-bit :)