mem: fix unmapping and marking segments as free
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 3 May 2018 10:11:27 +0000 (11:11 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 14 May 2018 01:17:48 +0000 (03:17 +0200)
commitcd3da7cb0e96300c388561f334a6be170702bc33
treedbae31cdf6f679fe8a0a12ba01e5da0dd4611083
parent3d2d9861a64dc111d67be3948bbf192f2acffa46
mem: fix unmapping and marking segments as free

Currently, page deallocation might fail if allocator cannot get page
fd, which will leave VA space still mapped, and will also not mark
page as free.

Fix page deallocation function to always unmap space before trying
to get rid of the page itself, and always mark page as free even if
page deallocation failed.

Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime")
Fixes: 1a7dc2252f28 ("mem: revert to using flock and add per-segment lockfiles")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_eal/linuxapp/eal/eal_memalloc.c