Thread (33 messages) flat view 33 messages, 9 authors, 2021-02-11
STALE2046d

[RFC PATCH v3 0/2] mempinfd: Add new syscall to provide memory pin

From: Zhou Wang <wangzhou1@hisilicon.com>
Date: 2021-02-07 08:33:37
Also in: linux-api, linux-iommu, linux-mm, lkml

This series adds a new mempinfd syscall to offer a common way to pin/unpin
memory.

Patch 1/2 is about mempinfd codes.
Patch 2/2 adds a simple test tool about mempinfd.

Change logs:
------------
v2 -> v3:
 - Follow suggestions from Greg and Kevin, add a new syscall.
 - Add input check.
 - Use xa_insert to replace xa_store.
 - Add lock to pretect pin and xa_insert.
v1 -> v2:
 - Some tiny fixes.
 - Follow Greg's suggestion to get mm-list and iommu-list involved.

Links:
------
 - v2: https://www.spinics.net/lists/kernel/msg3808926.html
 - v1: https://www.spinics.net/lists/kernel/msg3805205.html

Zhou Wang (2):
  mempinfd: Add new syscall to provide memory pin
  selftests/vm: add mempinfd test

 arch/arm64/include/asm/unistd.h       |   2 +-
 arch/arm64/include/asm/unistd32.h     |   2 +
 fs/Makefile                           |   1 +
 fs/mempinfd.c                         | 199 ++++++++++++++++++++++++++++++++++
 include/linux/syscalls.h              |   1 +
 include/uapi/asm-generic/unistd.h     |   4 +-
 include/uapi/linux/mempinfd.h         |  23 ++++
 init/Kconfig                          |   6 +
 tools/testing/selftests/vm/Makefile   |   1 +
 tools/testing/selftests/vm/mempinfd.c | 131 ++++++++++++++++++++++
 10 files changed, 368 insertions(+), 2 deletions(-)
 create mode 100644 fs/mempinfd.c
 create mode 100644 include/uapi/linux/mempinfd.h
 create mode 100644 tools/testing/selftests/vm/mempinfd.c

-- 
2.8.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help