From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 123E42965 for ; Fri, 29 Mar 2019 12:15:48 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9BB6421945; Fri, 29 Mar 2019 07:15:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 29 Mar 2019 07:15:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=kFP8okr2g3R6xysfPhlLPUzywf+v49OA4UDnf+DgrJE=; b=CaS+1QJZK5St q1NCj671C3sO67BMLPgyuzYSbJ4LalOJJ8vvDpd34o62lAs0XWG5VZgWmSMKen5S StAYo5bvJ2g7vV+Na2ag8ZXqRUnBRaqgF55XM9UrqwjGUGwHS05cO/+f940myMmJ if4hB+aVxIpEaPVvsvjrdz+sH6ceqfE= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=kFP8okr2g3R6xysfPhlLPUzywf+v49OA4UDnf+Dgr JE=; b=t6+s4dzUHb273c5ebSv9L1vR/IplkToCItsYoE28zHtl8K8Kgfl+FDFb/ XpYM2yCK3OlC/ZGnbQ5Y6XtpeNKMM/0FRD0YgaHndyjifgJoE1G5ARf041zBgIQ9 ccsiEw473EFvoo8gIFHgfbek5m61QTqj1cEoj/jp/6NIC1VGwo34C8XywTNu6hqa uUS4VYyOmgvVbdlnx5hyEcXKYHFStu646sPtYLrnqZ2kxeIogmIYfRy0k3vufj+A LKWKGgt6EAiRWm9QD/AvSrEk2kxPxYTCkTWX/PoV5/cQOkXoGA/I8zjJ/FEQ7Xxf kBNoRMQ8Q9NW0KH6opbNgwI2Z98ow== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkeeigddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id EDCC510393; Fri, 29 Mar 2019 07:15:45 -0400 (EDT) From: Thomas Monjalon To: Darek Stojaczyk Cc: dev@dpdk.org, "Burakov, Anatoly" , james.r.harris@intel.com, changpeng.liu@intel.com, gavin.hu@arm.com Date: Fri, 29 Mar 2019 12:15:44 +0100 Message-ID: <3325026.qBvnxJ56JQ@xps> In-Reply-To: References: <20190329050951.153202-1-dariusz.stojaczyk@intel.com> <20190329095239.9646-1-dariusz.stojaczyk@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] fbarray: fix attach deadlock 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: Fri, 29 Mar 2019 11:15:48 -0000 29/03/2019 11:42, Burakov, Anatoly: > On 29-Mar-19 9:52 AM, Darek Stojaczyk wrote: > > rte_fbarray_attach() currently locks its internal > > spinlock, but never releases it. Secondary processes > > won't even start if there is more than one fbarray > > to be attached to - the second rte_fbarray_attach() > > would be just stuck. > > > > Fix it by releasing the lock at the end of > > rte_fbarray_attach(). I believe this was the original > > intention. > > > > Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas") > > Cc: anatoly.burakov@intel.com > > Cc: thomas@monjalon.net > > > > Signed-off-by: Darek Stojaczyk > > Reviewed-by: Gavin Hu > > --- > > v2: > > - fixed one more case where we could unlock the spinlock > > before locking it > > Thanks for catching this! > > Acked-by: Anatoly Burakov Applied, thanks > There is one more case where we do unlock on init without locking, i'll > submit a patch separately (and will check other functions with a > microscope just in case). We'll take this one too. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 075E6A05D3 for ; Fri, 29 Mar 2019 12:15:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 084282BD3; Fri, 29 Mar 2019 12:15:50 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 123E42965 for ; Fri, 29 Mar 2019 12:15:48 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9BB6421945; Fri, 29 Mar 2019 07:15:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 29 Mar 2019 07:15:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=kFP8okr2g3R6xysfPhlLPUzywf+v49OA4UDnf+DgrJE=; b=CaS+1QJZK5St q1NCj671C3sO67BMLPgyuzYSbJ4LalOJJ8vvDpd34o62lAs0XWG5VZgWmSMKen5S StAYo5bvJ2g7vV+Na2ag8ZXqRUnBRaqgF55XM9UrqwjGUGwHS05cO/+f940myMmJ if4hB+aVxIpEaPVvsvjrdz+sH6ceqfE= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=kFP8okr2g3R6xysfPhlLPUzywf+v49OA4UDnf+Dgr JE=; b=t6+s4dzUHb273c5ebSv9L1vR/IplkToCItsYoE28zHtl8K8Kgfl+FDFb/ XpYM2yCK3OlC/ZGnbQ5Y6XtpeNKMM/0FRD0YgaHndyjifgJoE1G5ARf041zBgIQ9 ccsiEw473EFvoo8gIFHgfbek5m61QTqj1cEoj/jp/6NIC1VGwo34C8XywTNu6hqa uUS4VYyOmgvVbdlnx5hyEcXKYHFStu646sPtYLrnqZ2kxeIogmIYfRy0k3vufj+A LKWKGgt6EAiRWm9QD/AvSrEk2kxPxYTCkTWX/PoV5/cQOkXoGA/I8zjJ/FEQ7Xxf kBNoRMQ8Q9NW0KH6opbNgwI2Z98ow== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkeeigddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id EDCC510393; Fri, 29 Mar 2019 07:15:45 -0400 (EDT) From: Thomas Monjalon To: Darek Stojaczyk Cc: dev@dpdk.org, "Burakov, Anatoly" , james.r.harris@intel.com, changpeng.liu@intel.com, gavin.hu@arm.com Date: Fri, 29 Mar 2019 12:15:44 +0100 Message-ID: <3325026.qBvnxJ56JQ@xps> In-Reply-To: References: <20190329050951.153202-1-dariusz.stojaczyk@intel.com> <20190329095239.9646-1-dariusz.stojaczyk@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] fbarray: fix attach deadlock 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190329111544.OgVD815WV9Wf_7psvY_CM1TNwEZil-CdPXBfV0Td8Y4@z> 29/03/2019 11:42, Burakov, Anatoly: > On 29-Mar-19 9:52 AM, Darek Stojaczyk wrote: > > rte_fbarray_attach() currently locks its internal > > spinlock, but never releases it. Secondary processes > > won't even start if there is more than one fbarray > > to be attached to - the second rte_fbarray_attach() > > would be just stuck. > > > > Fix it by releasing the lock at the end of > > rte_fbarray_attach(). I believe this was the original > > intention. > > > > Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas") > > Cc: anatoly.burakov@intel.com > > Cc: thomas@monjalon.net > > > > Signed-off-by: Darek Stojaczyk > > Reviewed-by: Gavin Hu > > --- > > v2: > > - fixed one more case where we could unlock the spinlock > > before locking it > > Thanks for catching this! > > Acked-by: Anatoly Burakov Applied, thanks > There is one more case where we do unlock on init without locking, i'll > submit a patch separately (and will check other functions with a > microscope just in case). We'll take this one too.