Skip to content

add struct page and Direct I/O support to reserved memory

Li Chen linux-arm-kernel linux-devicetree linux-mm lkml llvm oe-kbuild oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 25 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4of: add struct page support to rmemdrivers/of/Kconfig drivers/of/of_reserved_mem.c include/linux/of_reserved_mem.h+237 -14 replies
2/4mm/sparse: skip no-map memblock check when fill_subsection_mapmm/sparse.c+3 -14 replies
3/4arm64: mm: move memblock_clear_nomap after __add_pagesarch/arm64/mm/mmu.c+1 -10 replies
4/4sample/reserved_mem: Introduce a sample of struct page and dio support to no-map rmemsamples/Kconfig samples/Makefile samples/reserved_mem/Makefile +1 more+126 -013 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] add struct page and Direct I/O support to reserved memory

This patch series use ZONE_DEVICE and mhp to add Direct I/O support to reserved memory when rmem is as dio's src buffer.

Our use case is when isp generates frame and writes to given memory region, arm(kernel) will try to read frames from the reserved memory region. If throughput is low, frame loss will be serious.

Before this patch series, we can only use bufferd I/O and the throughput is very low even with the help of AIO/io_uring.

This patch is tested on v5.15.35 + no-map rmem region, and can be git am into 5.19-rc5 without conflicts.

Li Chen (4):
of: add struct page support to rmem
mm/sparse: skip no-map memblock check when fill_subsection_map
arm64: mm: move memblock_clear_nomap after __add_pages sample/reserved_mem: Introduce a sample of struct page and dio support
to no-map rmem

 arch/arm64/mm/mmu.c             |   2 +-
 drivers/of/Kconfig              |   9 ++
 drivers/of/of_reserved_mem.c    | 218 +++++++++++++++++++++++++++++++-
 include/linux/of_reserved_mem.h |  11 ++
 mm/sparse.c                     |   4 +-
 samples/Kconfig                 |   7 +
 samples/Makefile                |   1 +
 samples/reserved_mem/Makefile   |   2 +
 samples/reserved_mem/rmem_dio.c | 116 +++++++++++++++++
 9 files changed, 367 insertions(+), 3 deletions(-)
 create mode 100755 samples/reserved_mem/Makefile
 create mode 100755 samples/reserved_mem/rmem_dio.c
Signature · 1 line
2.25.1