Commit Graph

8 Commits

Author SHA1 Message Date
Lionel Debroux
53ca89f8ae
Add initial NUMA awareness support (#378)
* Add a file containing useful macro definitions, currently a single top-level macro for obtaining the size of an array; use it to replace a sizeof(x) / sizeof(x[0]) construct in system/smbus.c . This requires switching the GCC build mode from C11 to C11 with GCC extensions.

* Initial NUMA awareness (#12) support: parse the ACPI SRAT to build up new internal structures related to proximity domains and affinity; use these structures in setup_vm_map() and calculate_chunk() to skip the work on the processors which don't belong to the proximity domain currently being tested.

Tested on a number of 1S single-domain, 2S multi-domain and 4S multi-domain platforms.

SKIP_RANGE(iterations) trick by Martin Whitaker.
2024-03-13 01:43:26 +01:00
Martin Whitaker
5a2bc4c960 Skip segments in tests where the calculated chunk size is too small.
If the memory map contains very small segments and we have many active CPUs,
the tests that split the segments into chunks distributed across the CPUs may
end up with chunks that are too small for the test algorithm. With 4K pages
and the current limit of 256 active CPUs, this is currently only a problem
for the block move and modulo-n tests, but if we ever support more than 512
active CPUs, it could affect the other tests too.

For now, just skip segments that are too small in the affected tests. As it
only affects the block move and modulo-n tests and only affects very small
regions of memory, the loss of test coverage is negligable.

This may fix issue #216.
2022-12-10 15:24:26 +00:00
Martin Whitaker
e92f488753 Improve efficiency of random number generation (discussion #8).
Use a more efficient algorithm that can be in-lined, and keep the
generator state in a local variable.
2022-03-05 20:04:32 +00:00
Martin Whitaker
0e61b1605e Remove volatile qualifier from testword pointers.
Now we use the atomic read/write functions, these are redundant.
2022-02-19 13:01:42 +00:00
Martin Whitaker
16d55b7dad Remove distinction between physical and virtual CPUs.
This is no longer needed, now we can display as many CPUs as we can
physically handle.
2022-01-31 22:59:14 +00:00
Martin Whitaker
d9fee4dcbb Flush caches between writing and verifying test data.
Mostly we write and read large chunks of data which will make it likely
that the data is no longer in the cache when we come to verify it. But
this is not always true, and in any case, we shouldn't rely on it.
2021-12-23 11:00:10 +00:00
Martin Whitaker
11c0c6c2f5 Use atomic memory read/write functions in tests.
This ensures compiler optimisations won't interfere with the tests.
2021-12-23 10:07:55 +00:00
Martin Whitaker
fbd3376668 Initial commit. 2020-05-24 21:30:55 +01:00