From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 82D9F187 for ; Mon, 30 Apr 2018 15:27:35 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9AF672265C; Mon, 30 Apr 2018 09:27:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 30 Apr 2018 09:27:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=/KkOT+yO41bx/EdP5ddrRDdHmv K664pGN9pBB/RSlcg=; b=GkCj6ETLqH1QolXMnDZsvqVOtTLtzeb8enZdpOMnxy 0gB0Oxu9emfChCiKlCTsMsN9yzU55HH2OuJkEO7QhjwTBUimWlYks/3xyqEh3bvP EJKLoORrzQX2UESc8+Y3uDAWSpYqF0pd+/4jvOQKpbuU4rijfdeYV57XhbXKUX7E 4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/KkOT+ yO41bx/EdP5ddrRDdHmvK664pGN9pBB/RSlcg=; b=C26lmXwHP55Vr3cV5LLHol IjlBlnCj9CqV2eP/AX2LtMHR4K3iHP+v3YzhoXPPMS4WWNmjieGU3p1pQZXZ3rs+ 2EiuzmjNEaxia1WONeRUx6T1wYWVRiVnad3wvu/3vZEIbSGvLlwJyoZQmS7Rp8N7 A+Ah6Du0DxZNkBmnTtCecqxG0D3jkeh9CEaocJHZNiCRx1Dv4sKEfrSBFy1rFnZA p6KWAs1kvZzT9+k5psABj3+xsW7MbxljGnFH8/OochYcvKugiaya23wMwIecUqvT 5X72GuIPS2rGvdRLzBfSJ0Gvu68GdJJZnXeE3GzqslfEJpKSKAVWrNdEk6wRZHAQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C7F2E498C; Mon, 30 Apr 2018 09:27:33 -0400 (EDT) From: Thomas Monjalon To: Anatoly Burakov Cc: dev@dpdk.org, Andrew Rybchenko Date: Mon, 30 Apr 2018 15:27:32 +0200 Message-ID: <4914396.bRUXGW2plj@xps> In-Reply-To: <8d3e2cc3-d4fd-6c84-e136-aef593b5ea4d@solarflare.com> References: <00fe124e2057fe6c5596fb0a24bdcce9b36c3b90.1525082912.git.anatoly.burakov@intel.com> <8d3e2cc3-d4fd-6c84-e136-aef593b5ea4d@solarflare.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] eal: check if hugedir write lock is already being held X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 13:27:35 -0000 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@intel.com > > > > Signed-off-by: Anatoly Burakov Tested-by: Maxime Coquelin Tested-by: Shahaf Shuler > Tested-by: Andrew Rybchenko Applied, thanks