On 20-Oct-20 3:09 PM, Thomas Monjalon wrote:
16/10/2020 11:28, wangyunjian:
From: Yunjian Wang <wangyunj...@huawei.com>
Currently, a issue that a container has many devices and the
application will map the same memory many times. The kernel
driver returns EEXIST as long as there are overlapping memory
areas. As a result, we repeatedly create new user mem map entry
for the same memory segment and this will lead to no more space
for other user mem maps.
To resolve the issue, add support to remove the same entry in
the function compact_user_maps().
Sorry I don't understand the explanations above.
Anatoly, please could you help in rewording?
Apologies for delay, fell through the cracks.
Suggested rewording:
Currently, user mem maps will check if the newly mapped area is adjacent
to any existing mapping, but will not check if the mapping is identical
because it assumes that the API will never get called with the same
mapping twice. This will result in duplicate entries in the user mem
maps list.
Fix it by also checking for duplicate mappings, and skipping them if
they are found.
--
Thanks,
Anatoly