Page MenuHomeFreeBSD

uma: fix zone domain overlaying pcpu cache with disabled cpus
ClosedPublic

Authored by rlibby on Jan 22 2020, 6:37 PM.
Tags
None
Referenced Files
F132376056: D23318.id67149.diff
Thu, Oct 16, 8:51 AM
F132376048: D23318.id67177.diff
Thu, Oct 16, 8:51 AM
F132376044: D23318.id.diff
Thu, Oct 16, 8:51 AM
F132320720: D23318.diff
Wed, Oct 15, 9:12 PM
Unknown Object (File)
Thu, Oct 9, 4:17 AM
Unknown Object (File)
Sat, Sep 27, 3:30 PM
Unknown Object (File)
Sat, Sep 27, 3:19 PM
Unknown Object (File)
Sat, Sep 27, 3:17 PM

Details

Summary

UMA zone structures have two arrays at the end which are sized according
to the machine: an array of cpu count length, and an array of NUMA
domain count length. The CPU counting was wrong in the case where some
CPUs are disabled (when mp_ncpus != mp_maxid + 1), and this caused the
second array to be overlaid with the first.

Reported by: olivier

Test Plan

Disable some CPUs. Olivier did this with

machdep.hyperthreading_allowed="0"

but I did not have a hyperthreading machine to test so I did this from
the loader:

set hint.lapic.1.disabled=1
set hint.lapic.3.disabled=1
set hint.lapic.5.disabled=1
set hint.lapic.7.disabled=1
set hint.lapic.9.disabled=1
set hint.lapic.11.disabled=1
set hint.lapic.13.disabled=1
set hint.lapic.15.disabled=1

Then:
kyua test -k /usr/tests/sys/Kyuafile

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable