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 6BFD4A00C5; Thu, 30 Apr 2020 11:08:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8B6E1DA0D; Thu, 30 Apr 2020 11:08:16 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id F21721D8D3 for ; Thu, 30 Apr 2020 11:08:12 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200430090645euoutp02470ee95748f32e95c35236d99d911972~Kja-nc0Qe0983909839euoutp02p for ; Thu, 30 Apr 2020 09:06:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200430090645euoutp02470ee95748f32e95c35236d99d911972~Kja-nc0Qe0983909839euoutp02p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1588237605; bh=8F8UUIl4+TDQkPJMYmbxOIhXJDWEH+AT60OCEHJ1pAI=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=hniSe4pjAU/XxhcSIjtj4SZLCwfXro7eoMLJlJQQ9jF20oNowjWG0rHo7h1UBb7rR s+/bamy+/lIYEAMSW+xRmTqXPYPKF1SAjONML5BSCk3cim2Zc5IEm3JR8Vf8YKf36W tVMmst4lIP6d4wA9nMW853hUAA1d8cZH0dzE6BlU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200430090645eucas1p2905753bddd6944893af3ad9e04358b92~Kja-gOeCJ1214012140eucas1p25; Thu, 30 Apr 2020 09:06:45 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B1.99.60698.5259AAE5; Thu, 30 Apr 2020 10:06:45 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200430090644eucas1p219f15e5ec055bbf31749889f7bcda36f~Kja-OMW1I2454624546eucas1p2M; Thu, 30 Apr 2020 09:06:44 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200430090644eusmtrp28ef7f9efa58689b4cf23f3e7ae718b2a~Kja-NiNnN2196821968eusmtrp2k; Thu, 30 Apr 2020 09:06:44 +0000 (GMT) X-AuditID: cbfec7f5-a29ff7000001ed1a-f0-5eaa952582f8 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 9B.20.08375.4259AAE5; Thu, 30 Apr 2020 10:06:44 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200430090644eusmtip20e5dc2209e6e4c89fd56a130055529a4~Kja_m5r4i3159131591eusmtip2z; Thu, 30 Apr 2020 09:06:44 +0000 (GMT) To: Phil Yang , Harry van Haaren , Jerin Jacob Cc: "dev@dpdk.org" , "stable@dpdk.org" , nd From: Lukasz Wojciechowski Message-ID: <1bbd5843-7d1e-c564-104e-e0014db57695@partner.samsung.com> Date: Thu, 30 Apr 2020 11:06:42 +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: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIKsWRmVeSWpSXmKPExsWy7djP87qqU1fFGbQ8YLF492k7k0Vj/zcW i4mTTCzOLO9htljzvpvZ4l/HH3YHNo8189Ywemw40c/q8WvBUlaPxXteMgWwRHHZpKTmZJal FunbJ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glA1AhL/LnWxQZR85pR 4vqauWwgNcICFhJL3nmB1IgINDFKHFsvA2IzC0RKTFkwmxmi/g+TxM07b5lBEmwCthJHZn5l BbF5BdwkZqz5AWazCKhKPO29wAoyU1QgVqLloiZEiaDEyZlPWEBsTqDwqoPPmCHmm0nM2/wQ ypaXaN46G8oWkbjxqIVxAqPQLCTts5C0zELSMgtJywJGllWMIqmlxbnpucWGesWJucWleel6 yfm5mxiB0bXt2M/NOxgvbQw+xCjAwajEw2uRujJOiDWxrLgy9xCjBAezkgjvw9hVcUK8KYmV ValF+fFFpTmpxYcYTYF+m8gsJZqcD4z8vJJ4Q1NDcwtLQ3Njc2MzCyVx3g6BgzFCAumJJanZ qakFqUUwfUwcnFINjMbi6c+SXxdG209eYryq8IzT0lns/xdfcO1Y8NFj6SmfnKD8dLVNNrH+ J6es9WtNv/iTw2kB49n5r/zPXp75wHyj/YO7M2y9nOV26JnIVubkWnLuuFZ8lCVYPv7mEuNv tYtF3jj8euMcaTOn4e7zhd3T3OKur1XclxV0SkAiU9A9541Mbsr0RUosxRmJhlrMRcWJAC7F lLzEAgAA X-CMS-MailID: 20200430090644eucas1p219f15e5ec055bbf31749889f7bcda36f 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" W dniu 30.04.2020 o 04:54, Phil Yang pisze: >> -----Original Message----- >> From: Lukasz Wojciechowski >> Sent: Thursday, April 30, 2020 5:32 AM >> To: Phil Yang ; Harry van Haaren >> ; Jerin Jacob >> >> Cc: dev@dpdk.org; stable@dpdk.org; nd >> Subject: Re: [dpdk-dev] [PATCH] eal: fix lcore state bug >> >> 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. > Yeah. I think that is a good point. > > Reviewed-by: Phil Yang Thank you > >>> >>> >>> 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 -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com