[dpdk-dev] [PATCH] eal: check if hugedir write lock is already being held

Andrew Rybchenko arybchenko at solarflare.com
Mon Apr 30 15:07:58 CEST 2018


On 04/30/2018 01:38 PM, Anatoly Burakov wrote:
> At hugepage info initialization, EAL takes out a write lock on
> hugetlbfs directories, and drops it after the memory init is
> finished. However, in non-legacy mode, if "-m" or "--socket-mem"
> switches are passed, this leads to a deadlock because EAL tries
> to allocate pages (and thus take out a write lock on hugedir)
> while still holding a separate hugedir write lock in EAL.
>
> Fix it by checking if write lock in hugepage info is active, and
> not trying to lock the directory if the hugedir fd is valid.
>
> Fixes: 1a7dc2252f28 ("mem: revert to using flock and add per-segment lockfiles")
> Cc: anatoly.burakov at intel.com
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>

Tested-by: Andrew Rybchenko <arybchenko at solarflare.com>


More information about the dev mailing list