> -----Original Message-----
> From: Ding, Xuan <xuan.d...@intel.com>
> Sent: Monday, October 11, 2021 4:00 PM
> To: dev@dpdk.org; Burakov, Anatoly <anatoly.bura...@intel.com>;
> maxime.coque...@redhat.com; Xia, Chenbo <chenbo....@intel.com>
> Cc: Hu, Jiayu <jiayu...@intel.com>; Jiang, Cheng1 <cheng1.ji...@intel.com>;
> Richardson, Bruce <bruce.richard...@intel.com>; Pai G, Sunil
> <sunil.pa...@intel.com>; Wang, Yinan <yinan.w...@intel.com>; Yang,
> YvonneX <yvonnex.y...@intel.com>; Ding, Xuan <xuan.d...@intel.com>
> Subject: [PATCH v7 1/2] 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.bura...@intel.com>
> Signed-off-by: Xuan Ding <xuan.d...@intel.com>
> ---

Tested-by: Yvonne Yang <yvonnex.y...@intel.com>

Reply via email to