Commit Graph

9 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
martinwhitaker
186ef6e913
Improved own addr test (#219)
* For 64-bit images, use the physical address as the test pattern in test 2.

This will make it easier to diagnose faults.

* Disable test 1 by default (issue #155).

Test 2 provides the same test coverage. Test 1 may make it slightly easier
to diagnose faults with a 32-bit image, so leave it as an option.

* For 32 bit images, use the physical address to generate the offset in test 2.

Detecting a stage change and using that to reset the offset counter
could fail when the config menu was used to skip to the next test
(issue #224).
2023-01-04 23:26:22 +01:00
martinwhitaker
93c9c8ded5
Rework memory mapping to allow for larger program size (#54)
* Improve abstraction in vmem.h and limit memory benchmarking to first 2GB.

The third GB may get used for remapping memory regions that are only
accessed during startup, so it's not safe to use it for the memory
speed tests.

* Fix calculation of end limit for locating memory benchmark workspace.

* Document vmem.h.

* Use window number, not current start address, to detect first window.

* Increase the program low-load range from 1MB to 4MB and make more robust.

If the BIOS has reserved some parts of low memory, there may not be
enough contiguous space left to load the program there (issue #49).
So increase the low-load range to include the first 3MB of high
memory. Also guard against the program being initially loaded
straddling the new boundary.

Co-authored-by: Martin Whitaker <memtest@martin-whitaker.me.uk>
2022-04-28 23:04:01 +02: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
4078b7760e Faster barrier implementation.
The old barrier implementation was very slow when running on a multi-socket
machine (pcmemtest issue 16).

The new implementation provides two options:

  - when blocked, spin on a thread-local flag
  - when blocked, execute a HLT instruction and wait for a NMI

The first option might be faster, but we need to measure it to find out. A
new boot command line option is provided to select between the two, with a
third setting that uses a mixture of the two.
2022-02-28 22:05:21 +00:00
Martin Whitaker
3245b6d916 Don't turn the cache off in test 0 when performing dummy runs.
This should fix the slow startup on multi-socket machines (issue #16).
2022-02-19 20:55:41 +00:00
Martin Whitaker
1888f5c611 Add change to tests/test.c missed in commit dcac5270. 2022-02-02 15:33:25 +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
fbd3376668 Initial commit. 2020-05-24 21:30:55 +01:00