Page MenuHomeFreeBSD

Allocate arm64 per-CPU data in the correct domain
ClosedPublic

Authored by andrew on Oct 6 2021, 3:54 PM.
Tags
None
Referenced Files
F81899198: D32338.id96406.diff
Mon, Apr 22, 9:08 PM
Unknown Object (File)
Mon, Apr 22, 3:13 AM
Unknown Object (File)
Mar 7 2024, 11:58 PM
Unknown Object (File)
Mar 3 2024, 9:29 AM
Unknown Object (File)
Feb 17 2024, 9:27 AM
Unknown Object (File)
Feb 17 2024, 7:59 AM
Unknown Object (File)
Jan 24 2024, 3:51 AM
Unknown Object (File)
Jan 16 2024, 9:29 PM
Subscribers

Details

Summary

To minimise NUMA traffic allocate the pcpu, dpcpu, and boot stacks in
the correct domain when possible.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew requested review of this revision.Oct 6 2021, 3:54 PM
sys/arm64/arm64/machdep.c
106

Isn't this the same as cpuid_to_pcpu[] now? Do we need __pcpu[] at all?

sys/arm64/arm64/mp_machdep.c
505
639

I think this probably deserves an XXX comment.

sys/arm64/arm64/mp_machdep.c
514

FWIW, there is no benefit to allocating domain-local boot stacks, they are used only in the window after the AP starts and before it switches to a thread.

sys/arm64/arm64/mp_machdep.c
514

I mostly did it for consistency.

markj added inline comments.
sys/arm64/arm64/machdep.c
773

We assume that .bss is allocated from the domain to which the BSP belongs. That's probably true in practice though, at least amd64 makes a similar assumption when it allocates the pcpu area in pmap_bootstrap().

This revision is now accepted and ready to land.Oct 7 2021, 4:02 PM