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

Thomas Monjalon thomas at monjalon.net
Mon Apr 30 15:27:32 CEST 2018


30/04/2018 15:07, Andrew Rybchenko:
> 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: Maxime Coquelin <maxime.coquelin at redhat.com>
Tested-by: Shahaf Shuler <shahafs at mellanox.com>
> Tested-by: Andrew Rybchenko <arybchenko at solarflare.com>

Applied, thanks




More information about the dev mailing list