From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <mousuanming@huawei.com> Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 69F8A1B593 for <dev@dpdk.org>; Fri, 26 Apr 2019 16:49:11 +0200 (CEST) Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A2EBA7EE69305D96B83B for <dev@dpdk.org>; Fri, 26 Apr 2019 22:49:09 +0800 (CST) Received: from [127.0.0.1] (10.177.131.206) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Fri, 26 Apr 2019 22:49:07 +0800 To: "Burakov, Anatoly" <anatoly.burakov@intel.com>, "Varghese, Vipin" <vipin.varghese@intel.com>, "Pattan, Reshma" <reshma.pattan@intel.com> CC: "'dev@dpdk.org'" <dev@dpdk.org> References: <1556210141-43153-1-git-send-email-mousuanming@huawei.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33DEB0@BGSMSX101.gar.corp.intel.com> <25e85f37-231e-d303-8d7a-e3addd6534d5@huawei.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33E2C8@BGSMSX101.gar.corp.intel.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33E2E3@BGSMSX101.gar.corp.intel.com> <ee413010-8b73-c1e0-90b7-98586af2f94b@huawei.com> <f4e09994-edb1-9a1d-70ed-74299edc93c0@intel.com> <ed0f408c-0c6d-595a-22d9-996a6c8bdacf@huawei.com> <bed0c61c-d1ab-dc59-bc5c-35b663846b33@intel.com> From: Suanming.Mou <mousuanming@huawei.com> Message-ID: <0de4a0d5-85fa-8290-20af-62fdf66e2e94@huawei.com> Date: Fri, 26 Apr 2019 22:49:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <bed0c61c-d1ab-dc59-bc5c-35b663846b33@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.177.131.206] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH] app/pdump: exits once primary app exited X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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> X-List-Received-Date: Fri, 26 Apr 2019 14:49:11 -0000 On 2019/4/26 22:39, Burakov, Anatoly wrote: > On 26-Apr-19 3:32 PM, Suanming.Mou wrote: >> >> On 2019/4/26 21:46, Burakov, Anatoly wrote: >>> On 26-Apr-19 1:08 PM, Suanming.Mou wrote: >>>> >>>> On 2019/4/26 18:56, Varghese, Vipin wrote: >>>>> >>>>> I will leave this suggestion open for comments from the maintainer. >>>>> >>>> Hi, >>>> >>>> Thanks for your suggestion. I have also tried to add an slave core >>>> to monitor the primary status this afternoon. It works. >>>> >>>> I doubt if it can be add an new option as you suggested, but which >>>> will also require people who complain the exiting to add an extra >>>> slave core for that. >>>> >>>> Please waiting for the new patch in one or two days. >>>> >>> >>> You can use alarm API to check for this regularly. It's not like the >>> interrupt thread is doing much anyway. Just set alarm to fire every >>> N seconds, and that's it. >> >> Hi, >> >> Thank you very much for the suggestion. Yes, that seems the best >> solution. Just tested it roughly as the code below: >> >> +static void monitor_primary(void *arg __rte_unused) >> +{ >> + if (quit_signal) >> + return; >> + >> + if (rte_eal_primary_proc_alive(NULL)) >> + rte_eal_alarm_set(MONITOR_INTERVEL, monitor_primary, NULL); >> + else >> + quit_signal = 1; >> + >> + return; >> +} >> + >> static inline void >> dump_packets(void) >> { >> int i; >> uint32_t lcore_id = 0; >> >> + if (exit_with_primary) >> + rte_eal_alarm_set(MONITOR_INTERVEL, monitor_primary, NULL); >> + >> >> >> I will prepare the patch with option exit_with_primary. >> > > Actually, i'm curious if this really does work. Unless my knowledge is > out of date, interrupt thread doesn't work in secondary processes, and > by extension neither should the alarm API... Uh... If I understand correctly, the alarm API has used in the secondary before. Refer to handle_primary_request().... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <dev-bounces@dpdk.org> Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 795A3A05D3 for <public@inbox.dpdk.org>; Fri, 26 Apr 2019 16:49:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 00DE21B6CA; Fri, 26 Apr 2019 16:49:12 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 69F8A1B593 for <dev@dpdk.org>; Fri, 26 Apr 2019 16:49:11 +0200 (CEST) Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A2EBA7EE69305D96B83B for <dev@dpdk.org>; Fri, 26 Apr 2019 22:49:09 +0800 (CST) Received: from [127.0.0.1] (10.177.131.206) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Fri, 26 Apr 2019 22:49:07 +0800 To: "Burakov, Anatoly" <anatoly.burakov@intel.com>, "Varghese, Vipin" <vipin.varghese@intel.com>, "Pattan, Reshma" <reshma.pattan@intel.com> CC: "'dev@dpdk.org'" <dev@dpdk.org> References: <1556210141-43153-1-git-send-email-mousuanming@huawei.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33DEB0@BGSMSX101.gar.corp.intel.com> <25e85f37-231e-d303-8d7a-e3addd6534d5@huawei.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33E2C8@BGSMSX101.gar.corp.intel.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33E2E3@BGSMSX101.gar.corp.intel.com> <ee413010-8b73-c1e0-90b7-98586af2f94b@huawei.com> <f4e09994-edb1-9a1d-70ed-74299edc93c0@intel.com> <ed0f408c-0c6d-595a-22d9-996a6c8bdacf@huawei.com> <bed0c61c-d1ab-dc59-bc5c-35b663846b33@intel.com> From: Suanming.Mou <mousuanming@huawei.com> Message-ID: <0de4a0d5-85fa-8290-20af-62fdf66e2e94@huawei.com> Date: Fri, 26 Apr 2019 22:49:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <bed0c61c-d1ab-dc59-bc5c-35b663846b33@intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.177.131.206] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH] app/pdump: exits once primary app exited X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dev" <dev-bounces@dpdk.org> Message-ID: <20190426144905.UnhqTkrHrxxr3XNBpjNsukrxBwteCHdMhkgSghSOmeY@z> On 2019/4/26 22:39, Burakov, Anatoly wrote: > On 26-Apr-19 3:32 PM, Suanming.Mou wrote: >> >> On 2019/4/26 21:46, Burakov, Anatoly wrote: >>> On 26-Apr-19 1:08 PM, Suanming.Mou wrote: >>>> >>>> On 2019/4/26 18:56, Varghese, Vipin wrote: >>>>> >>>>> I will leave this suggestion open for comments from the maintainer. >>>>> >>>> Hi, >>>> >>>> Thanks for your suggestion. I have also tried to add an slave core >>>> to monitor the primary status this afternoon. It works. >>>> >>>> I doubt if it can be add an new option as you suggested, but which >>>> will also require people who complain the exiting to add an extra >>>> slave core for that. >>>> >>>> Please waiting for the new patch in one or two days. >>>> >>> >>> You can use alarm API to check for this regularly. It's not like the >>> interrupt thread is doing much anyway. Just set alarm to fire every >>> N seconds, and that's it. >> >> Hi, >> >> Thank you very much for the suggestion. Yes, that seems the best >> solution. Just tested it roughly as the code below: >> >> +static void monitor_primary(void *arg __rte_unused) >> +{ >> + if (quit_signal) >> + return; >> + >> + if (rte_eal_primary_proc_alive(NULL)) >> + rte_eal_alarm_set(MONITOR_INTERVEL, monitor_primary, NULL); >> + else >> + quit_signal = 1; >> + >> + return; >> +} >> + >> static inline void >> dump_packets(void) >> { >> int i; >> uint32_t lcore_id = 0; >> >> + if (exit_with_primary) >> + rte_eal_alarm_set(MONITOR_INTERVEL, monitor_primary, NULL); >> + >> >> >> I will prepare the patch with option exit_with_primary. >> > > Actually, i'm curious if this really does work. Unless my knowledge is > out of date, interrupt thread doesn't work in secondary processes, and > by extension neither should the alarm API... Uh... If I understand correctly, the alarm API has used in the secondary before. Refer to handle_primary_request()....