From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 82D29A0507;
	Wed, 30 Mar 2022 19:04:36 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id E0A0942837;
	Wed, 30 Mar 2022 19:04:35 +0200 (CEST)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com
 [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id E6EFB40685;
 Wed, 30 Mar 2022 19:04:33 +0200 (CEST)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 6E9215C019A;
 Wed, 30 Mar 2022 13:04:31 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute4.internal (MEProxy); Wed, 30 Mar 2022 13:04:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm1; bh=toSB54UNgd5E7A
 R96qYApt+qp5EQNph2Vt21jZUPacI=; b=vuGJ1/sMohxhZGyTkBWobyLDRUQgWf
 w0hegW1e4GDZ2iTtnwucbxmFkw+D4jGabEXI10L1fx/g6RiTpyMQrhbyopiHt6B8
 Yl+fS+K2A9/8QNer21akUBywspfiP8SN51g2Og5TCizYEqL8H+/HEcyacrx77+Eb
 XMSTnoUKjRd6Tk+c4Ol2mAiQWrsHa20XgvQPY4E4L4q1OYBr1Rot/r6hN20Q+d2D
 /7mg2BZGbF8MmPNMRKgp1yUkM23Ihah54INuC+brgrh+Q9IYw9gc9rKRbeYNx8dC
 9kENtedr6Jhlsu8//8SbsrtHM+RjYZvPgGbfLY1CDesPGiOuHWbovHnA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm3; bh=toSB54UNgd5E7AR96qYApt+qp5EQNph2Vt21jZUPa
 cI=; b=YvCOVXoZNjzeMtpwFXVm6Fbigwhoouq4C7H8GDUhX5l7fQl0zzNqHvBvc
 96hzXHiU6Tp10fnmNATtkGolXrphKEGF+ebS5JilsMJRaNkqTUB32a96RwCDj6TS
 HsSeo1Uo7Beru1xBs6CiRb1vUgft4IskYmdQGeq2mVfCQWjB8HnULCN3UcUsw5PS
 8RU6lKSRzuX/JJBEUZAO+OT4kpyGTq3mOHAU7PLvt2rhuO4H9B0vMrvlCAkHM4Qy
 0HbFob5UVSLd0olvMVroOFNpUWl09eUqhAgYE7BTzbAKGjbFDfhVeHCjVityoC/n
 aU581tCtAk1hpVClc69xha38kGSPw==
X-ME-Sender: <xms:n41EYgiCSg_Kh3WjxakAXzRzSslqxb5hItLQe7EYy0e1x9XRwrX5qQ>
 <xme:n41EYpCp4oruKQqeBoZgzhXqyOJtDweolH-DeVihxDekbZoJcClbRQ34_JSc0iN2D
 ByXDqgmnP82_UR4vA>
X-ME-Received: <xmr:n41EYoHq-e6Gu75m43SH66CBklkP0DNtXKVAM0Ko2BBxbCHalhpxi7-2mfJOHONx2FWTYhQd0Drl3-yEJMD87092bw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddguddtlecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhgggfgtsehtuf
 ertddttddvnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghs
 sehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepudeggfdvfeduffdtfe
 eglefghfeukefgfffhueejtdetuedtjeeuieeivdffgeehnecuvehluhhsthgvrhfuihii
 vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonh
 drnhgvth
X-ME-Proxy: <xmx:n41EYhQr6Jo9CJpJ_N5KtWdvhMW27M_6U-yqDVPXhIi9_-6JUuKbiw>
 <xmx:n41EYtwTQtYHIH2o5MsRMIexZcpb1Fb06e2PGIusCPbIdmyXTcnmNA>
 <xmx:n41EYv64sC93lOT9c008A4-lVV-kWB6MBOwgRmrauZqxH4LqPkQqNg>
 <xmx:n41EYl8ADE0gPzM0B98ORtP0ORIG0k3R6gr-r2y18eqXewFeATeNqg>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 30 Mar 2022 13:04:30 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: dev@dpdk.org, anand.rawat@intel.com, stable@dpdk.org,
 Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: Re: [PATCH] eal/windows: fix data race when creating threads
Date: Wed, 30 Mar 2022 19:04:29 +0200
Message-ID: <6367643.tM3a2QDmDi@thomas>
In-Reply-To: <20220310191932.17985164@sovereign>
References: <1646897708-3462-1-git-send-email-roretzla@linux.microsoft.com>
 <20220310191932.17985164@sovereign>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

10/03/2022 17:19, Dmitry Kozlyuk:
> Hi Tyler,
> 
> 2022-03-09 23:35 (UTC-0800), Tyler Retzlaff:
> > create lcore worker threads suspended and then subsequently resume to
> > allow &lcore_config[i].thread_id be stored before eal_thread_loop
> > execution.
> > 
> > Fixes: 53ffd9f080fc ("eal/windows: add minimum viable code")
> > Cc: anand.rawat@intel.com
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> 
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> 
> It takes some effort to correlate &lcore_config[i].thread_id
> with the code in the patch and knowledge of CreateThread()
> to understand the root cause.
> I suggest prepending an explanation to your commit message:
> 
> 	eal_thread_loop() uses lcore_config[i].thread_id,
> 	which is stored upon the return from CreateThread().
> 	Per documentation, eal_thread_loop() can start
> 	before CreateThread() returns and the ID is stored.

There was now reply to this suggestion after 3 weeks,
so I've decided to include it.

Applied, thanks.