From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A5DFDA00C5; Wed, 29 Apr 2020 23:32:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD07D1D9FB; Wed, 29 Apr 2020 23:32:15 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 2CA731D9B2 for ; Wed, 29 Apr 2020 23:32:13 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200429213213euoutp02d5658b73f011e709c6835dde67afb7b5~KZ8llNvE01008810088euoutp02R for ; Wed, 29 Apr 2020 21:32:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200429213213euoutp02d5658b73f011e709c6835dde67afb7b5~KZ8llNvE01008810088euoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1588195933; bh=M/7KSwIbVYyFCrYyDTDl/LAmvpJaAdyCsi9wZdt7+nU=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=ScBEkKYrQrq3x+qaQoUPwUY83pNnz9gTxLv6lZo3cMlyoJ7b6h0fCwxTHHWlz25j9 weusv+Nm2MK1Lec2AJMbGyKTRbLgo2FIRhd2wX/oT02i0XJalgjhMkxnHoiGqh7gcB ilDOBwmqIIpDaN/3k9pFLpmmB5/dEehsvKPwlgpQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200429213213eucas1p2fdf519ce21db436edce936f830ad5eef~KZ8lY4bDy3184031840eucas1p2W; Wed, 29 Apr 2020 21:32:13 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 7E.33.60679.C52F9AE5; Wed, 29 Apr 2020 22:32:13 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200429213212eucas1p25e10de192ab5cb50d41a50d884102928~KZ8lDy_952338723387eucas1p2s; Wed, 29 Apr 2020 21:32:12 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200429213212eusmtrp28ffc1d5f3f2317527f8fdf1e354c8460~KZ8lDO1b60174301743eusmtrp2U; Wed, 29 Apr 2020 21:32:12 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-3b-5ea9f25c3b87 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 2D.5C.07950.C52F9AE5; Wed, 29 Apr 2020 22:32:12 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200429213212eusmtip25d4b3bba2354eecae23c6ca7b5a722ba~KZ8kd9mPG1266812668eusmtip2G; Wed, 29 Apr 2020 21:32:11 +0000 (GMT) To: Phil Yang , Harry van Haaren , Jerin Jacob Cc: "dev@dpdk.org" , "stable@dpdk.org" , nd From: Lukasz Wojciechowski Message-ID: Date: Wed, 29 Apr 2020 23:32:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHKsWRmVeSWpSXmKPExsWy7djPc7qxn1bGGRzew2jx7tN2JovG/m8s FhMnmVicWd7DbLHmfTezxb+OP+wObB5r5q1h9Nhwop/V49eCpawei/e8ZApgieKySUnNySxL LdK3S+DKeL36DnPBBb6KNVsmsTYwf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qpp 2MIGUiMsYCGx5J0XSI2IQBNQfL0MiM0sECkxZcFsZhBbSOANo8S03cogNpuArcSRmV9ZQWxe ATeJ13PPMILYLAKqEl1tR5lBRooKxEq0XNSEKBGUODnzCQtImBMovHdLAsR0M4l5mx8yQ9jy Es1bZ0PZ4hK3nsxnmsAoNAtJ9ywkLbOQtMxC0rKAkWUVo0hqaXFuem6xkV5xYm5xaV66XnJ+ 7iZGYFxtO/Zzyw7GrnfBhxgFOBiVeHgnpK+ME2JNLCuuzD3EKMHBrCTC+yhjWZwQb0piZVVq UX58UWlOavEhRlOg1yYyS4km5wNjPq8k3tDU0NzC0tDc2NzYzEJJnLdD4GCMkEB6Yklqdmpq QWoRTB8TB6dUA6NDTYLJhh3hl28ur2NOnxZaverj0/uFsmUhGlpJT0KOXYm3e5LvYRlZ1Z+7 /Y4dD8fWa1vfOl6a/fVWvtvDdjGTIvETueVSy2LVtuWdDEzbVM6xo0bv4TmHw2Lr9/Du+br+ TtmiAxsvf93u+cH/0DKlSVxvGtu0V+pb3lrzUbPs36frX48eefNPiaU4I9FQi7moOBEAUn0N zMECAAA= X-CMS-MailID: 20200429213212eucas1p25e10de192ab5cb50d41a50d884102928 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200428012204eucas1p120a84e501d0d64145c21476cd2562f36 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200428012204eucas1p120a84e501d0d64145c21476cd2562f36 References: <20200428012139.32196-1-l.wojciechow@partner.samsung.com> Subject: Re: [dpdk-dev] [PATCH] eal: fix lcore state bug 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" Hi Phil, W dniu 29.04.2020 o 17:07, Phil Yang pisze: > Hi Lukasz, > >> -----Original Message----- >> From: dev On Behalf Of Lukasz Wojciechowski >> Sent: Tuesday, April 28, 2020 9:22 AM >> To: Harry van Haaren ; Jerin Jacob >> >> Cc: dev@dpdk.org; l.wojciechow@partner.samsung.com; stable@dpdk.org >> Subject: [dpdk-dev] [PATCH] eal: fix lcore state bug >> >> The rte_service_lcore_reset_all function stops execution of services >> on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE. >> However the thread loop for slave lcores (eal_thread_loop) distincts these >> roles to set lcore state after processing delegated function. >> It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE. >> So changing the role to RTE before stopping work in slave lcores >> causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait >> must be run after rte_service_lcore_reset_all to bring back lcores to >> launchable (WAIT) state. > Is that make sense to call rte_eal_mp_wait_lcore() inside rte_serice_lcore_reset_all() ? yeah, I thought about it and in my opinion the answer is no, because if the function run on slave lcore is in FINISHED state it means, that someone can still read the value returned by the function and the only one who can be interested in the value is the one that delegated the service. If we will wait for lcores to end their jobs, read the values and switch them to WAIT state, the values will be lost. The application might need to read them. We cannot take this possibility from it. > > > Thanks, > Phil -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com