numam-dpdk/lib/eal/linux
Xuan Ding 56259f7fc0 vfio: allow partially unmapping adjacent memory
Currently, if we map a memory area A, then map a separate memory area B
that by coincidence happens to be adjacent to A, current implementation
will merge these two segments into one, and if partial unmapping is not
supported, these segments will then be only allowed to be unmapped in
one go. In other words, given segments A and B that are adjacent, it
is currently not possible to map A, then map B, then unmap A.

Fix this by adding a notion of "chunk size", which will allow
subdividing segments into equally sized segments whenever we are dealing
with an IOMMU that does not support partial unmapping. With this change,
we will still be able to merge adjacent segments, but only if they are
of the same size. If we keep with our above example, adjacent segments A
and B will be stored as separate segments if they are of different
sizes.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Tested-by: Yvonne Yang <yvonnex.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2021-10-21 14:24:21 +02:00
..
include eal: remove sys/queue.h from public headers 2021-10-01 13:09:43 +02:00
eal_alarm.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_cpuflags.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_debug.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_dev.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_hugepage_info.c eal/linux: allow hugetlbfs sub-directories 2021-10-12 21:07:46 +02:00
eal_interrupts.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_lcore.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_log.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_memalloc.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_memory.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_thread.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_timer.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_vfio_mp_sync.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal_vfio.c vfio: allow partially unmapping adjacent memory 2021-10-21 14:24:21 +02:00
eal_vfio.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal.c eal: limit telemetry to primary processes 2021-10-14 20:31:10 +02:00
meson.build lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00