Page MenuHomeFreeBSD

uma: fix zone domain overlaying pcpu cache with disabled cpus

Authored by rlibby on Jan 22 2020, 6:37 PM.



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


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

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

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rlibby created this revision.Jan 22 2020, 6:37 PM
jeff accepted this revision.Jan 22 2020, 6:39 PM

mea culpa. Can you commit to 12.x as well?

This revision is now accepted and ready to land.Jan 22 2020, 6:39 PM
In D23318#511196, @jeff wrote:

mea culpa. Can you commit to 12.x as well?

Will do.

markj accepted this revision.Jan 22 2020, 6:40 PM
This revision was automatically updated to reflect the committed changes.