Skip to content

ublk: NUMA-aware memory allocation

Ming Lei linux-block 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 6 repliesSuperseded
  3. v25 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches2 repliesSuperseded

Changes in v4 from the cover letter

- fix build failure because __counted_by() doesn't support nested fields
- fix commit log on patch "ublk: implement NUMA-aware memory allocation"

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/5ublk: reorder tag_set initialization before queue allocationdrivers/block/ublk_drv.c+6 -60 replies
2/5ublk: implement NUMA-aware memory allocationdrivers/block/ublk_drv.c+53 -310 replies
3/5ublk: use struct_size() for allocationdrivers/block/ublk_drv.c+3 -30 replies
4/5selftests: ublk: set CPU affinity before thread initializationtools/testing/selftests/ublk/kublk.c+10 -40 replies
5/5selftests: ublk: make ublk_thread thread-local variabletools/testing/selftests/ublk/kublk.c tools/testing/selftests/ublk/kublk.h+45 -400 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchCaleb Sander Mateos
1/5R-b
2/5R-b
3/5R-b
4/5
5/5

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] ublk: NUMA-aware memory allocation

Hi Jens,

The 1st two patches implement ublk driver NUMA aware memory allocation.

The last two patches implement it for ublk selftest utility.

taskset -c 0-31 ~/git/fio/t/io_uring -p0 -n16 -r 40 /dev/ublkb0 shows 5%~10% IOPS improvement on one AMD zen4 dual socket machine when creating ublk/null with 16 queues and AUTO_BUF_REG(zero copy).

V4:
- fix build failure because __counted_by() doesn't support nested fields
- fix commit log on patch "ublk: implement NUMA-aware memory allocation"

V3:
- don't use DECLARE_FLEX_ARRAY()
- annotate flexible array by __counted_by()

V2:
- use a flexible array member for queues field, save one indirection for retrieving ublk queue
- rename __queues into queues
- remove the queue_size field from struct ublk_device
- Move queue allocation and deallocation into ublk_init_queue() and ublk_deinit_queue()
- use flexible array for ublk_queue.ios
- convert ublk_thread_set_sched_affinity() to use pthread_setaffinity_np()

Ming Lei (5):
ublk: reorder tag_set initialization before queue allocation
ublk: implement NUMA-aware memory allocation
ublk: use struct_size() for allocation
selftests: ublk: set CPU affinity before thread initialization
selftests: ublk: make ublk_thread thread-local variable

 drivers/block/ublk_drv.c             | 98 +++++++++++++++++-----------
 tools/testing/selftests/ublk/kublk.c | 70 ++++++++++++--------
 tools/testing/selftests/ublk/kublk.h |  9 +--
 3 files changed, 105 insertions(+), 72 deletions(-)
Signature · 1 line
2.47.0