In the past, memory in spdk could have been unregistered in different chunks than it was registered, so to account for that the vtophys code used to register each hugepage (2MB chunk of memory) separately to the VFIO driver. This really made the code generally simple. Now that memory in spdk can only be unregistered in the same chunks it was registered in, we no longer have to register each hugepage to VFIO separately. We could register the entire memory region with just a single VFIO ioctl instead, so that's we'll do now. This serves as an optimization as we obviously send less ioctls now, but most importantly it prevents SPDK from reaching a VFIO registrations limit that was introduced in Linux 5.1. [1] The default limit is 65535, which results in SPDK being able to make only the first 128GB of memory DMA-able. This is most problematic for vhost where we need to register the memory of all the VMs. Fixes #915 [1] 492855939bdb59c6f947b0b5b44af9ad82b7e38c ("vfio/type1: Limit DMA mappings per container") Change-Id: Ida40306b2684e20daa2fd8d12e0df2eef5a4bff1 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/432442 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> |
||
---|---|---|
.. | ||
env_internal.h | ||
env.c | ||
env.mk | ||
init.c | ||
Makefile | ||
memory.c | ||
pci_ioat.c | ||
pci_nvme.c | ||
pci_virtio.c | ||
pci_vmd.c | ||
pci.c | ||
threads.c |