mem: fix dynamic hugepage mapping in container
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 29 Oct 2021 09:53:10 +0000 (11:53 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 5 Nov 2021 14:28:55 +0000 (15:28 +0100)
commit9bffc92850e8524474eebe2d559d09bdf3f0b96b
treeb0f976037d5efe8014b78d02313d42256833c3e8
parent770d41bf33090462319c765c86a4c1979dc2a148
mem: fix dynamic hugepage mapping in container

Since its introduction in 2018, the SIGBUS handler was never registered,
and all related functions were unused.

A SIGBUS can be received by the application when accessing to hugepages
even if mmap() was successful, This happens especially when running
inside containers when there is not enough hugepages. In this case, we
need to recover. A similar scheme can be found in eal_memory.c.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
lib/eal/linux/eal_memalloc.c