Skip to content

memblock tests: add tests for memblock_alloc_exact_nid_raw

Rebecca Mckeever linux-mm lkml 4 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 1 replyApplied
  2. v35 patches 8 repliesSuperseded
  3. v25 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches0 repliesSuperseded

Changes in v4 from the cover letter

Based on feedback from David Hildenbrand:
PATCH 1:
- alloc_nid_api.c:
+ Add assert to ensure that TEST_F_EXACT flag only occurs with TEST_F_RAW flag

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/5memblock tests: introduce range tests for memblock_alloc_exact_nid_rawtools/testing/memblock/Makefile tools/testing/memblock/main.c tools/testing/memblock/tests/alloc_exact_nid_api.c +4 more+320 -2640 replies
2/5memblock tests: add top-down NUMA tests for memblock_alloc_exact_nid_rawtools/testing/memblock/tests/alloc_exact_nid_api.c tools/testing/memblock/tests/alloc_exact_nid_api.h+360 -00 replies
3/5memblock tests: add bottom-up NUMA tests for memblock_alloc_exact_nid_rawtools/testing/memblock/tests/alloc_exact_nid_api.c+282 -00 replies
4/5memblock tests: add generic NUMA tests for memblock_alloc_exact_nid_rawtools/testing/memblock/tests/alloc_exact_nid_api.c+465 -00 replies
5/5memblock tests: remove completed TODO itemtools/testing/memblock/TODO+1 -60 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchDavid Hildenbrand
1/5A-b
2/5A-b
3/5A-b
4/5A-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/5] memblock tests: add tests for memblock_alloc_exact_nid_raw

These patches add tests for memblock_alloc_exact_nid_raw(). There are two sets of tests: range tests and NUMA tests. The range tests use a normal (i.e., UMA) simulated physical memory and set the nid to NUMA_NO_NODE. The NUMA tests use a simulated physical memory that is set up with multiple NUMA nodes. Additionally, most of the NUMA tests set nid != NUMA_NO_NODE.

For the range tests, the TEST_F_EXACT flag is used to run the same set of range tests used for memblock_alloc_try_nid_raw(). The NUMA tests have the same setup as the corresponding test for memblock_alloc_try_nid_raw(), but several of the memblock_alloc_exact_nid_raw() tests fail to allocate memory in setups where the memblock_alloc_try_nid_raw() test would allocate memory. Also, some memblock_alloc_exact_nid_raw() tests drop the lower limit of the requested range in order to allocate within the requested node, but the same setup in a memblock_alloc_try_nid_raw() test allocates within the requested range.

---
Changelog

v3 -> v4
Based on feedback from David Hildenbrand:
PATCH 1:
- alloc_nid_api.c:
+ Add assert to ensure that TEST_F_EXACT flag only occurs with TEST_F_RAW flag

v2 -> v3
Based on feedback from David Hildenbrand:
PATCH 1:
- alloc_nid_api.c, alloc_nid_api.h, common.h:
+ Add TEST_F_EXACT flag so that tests in alloc_nid_api.c can be run with that flag to test memblock_alloc_exact_nid_raw()
- alloc_exact_nid_api.c:
+ Update to run range tests in alloc_nid_api.c with TEST_F_EXACT flag instead of using a separate set of tests
- alloc_nid_api.c:
+ Rename tests and other functions by removing "_try" so that the function names are general enough to refer to any of the memblock_alloc_*nid*() functions of the memblock API

v1 -> v2
PATCH 0:
- Add missing memblock_alloc_exact_nid_raw to subject line
---

Rebecca Mckeever (5):
memblock tests: introduce range tests for memblock_alloc_exact_nid_raw memblock tests: add top-down NUMA tests for
memblock_alloc_exact_nid_raw
memblock tests: add bottom-up NUMA tests for
memblock_alloc_exact_nid_raw
memblock tests: add generic NUMA tests for
memblock_alloc_exact_nid_raw
memblock tests: remove completed TODO item

 tools/testing/memblock/Makefile               |    2 +-
 tools/testing/memblock/TODO                   |    7 +-
 tools/testing/memblock/main.c                 |    2 +
 .../memblock/tests/alloc_exact_nid_api.c      | 1113 +++++++++++++++++
 .../memblock/tests/alloc_exact_nid_api.h      |   25 +
 tools/testing/memblock/tests/alloc_nid_api.c  |  546 ++++----
 tools/testing/memblock/tests/alloc_nid_api.h  |    1 +
 tools/testing/memblock/tests/common.h         |    2 +
 8 files changed, 1428 insertions(+), 270 deletions(-)
 create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.c
 create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.h
Signature · 1 line
2.34.1