From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E62D1423CB; Sun, 29 Jan 2023 21:46:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FFB640ED8; Sun, 29 Jan 2023 21:46:31 +0100 (CET) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mails.dpdk.org (Postfix) with ESMTP id 6C1E540ED4 for ; Sun, 29 Jan 2023 10:59:00 +0100 (CET) Received: by mail-qk1-f169.google.com with SMTP id o4so464688qkk.8 for ; Sun, 29 Jan 2023 01:59:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CdIFLsWYbnnEq85vNFBem4Uyq2fEMK3pI/lkvdq6YRY=; b=I2rBwlhKOEdQ4I2FxxBw4uzvLqEg9txIEqPwhbXkZ4thp7ebBvDDTCoTXMn39yQwie V2ugeUo3Z6gjDVUbpe0tm0+N5/a7A7STcx5aV7MhppxGnItv9SalWeY0LrdM5dQo/Vo1 KqAFGYM07lSFv9KiXYffTbVboxKAnKfwCvqgi6HKuzDjMknNbigz1UO23myaQYLBpt44 RCHmck1iyTghVAkAdMgp2VQNTJCh0CpNhXCb+DgoCPUxsNPxl2so1jeMvWCzXNE3zE0e Plu9FZUds9HVP2u3garuE9KbGuF8zvahlRAsQzaI7/5Sw7QE6RkkEzv/nmiazb5D8XJA +Prg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CdIFLsWYbnnEq85vNFBem4Uyq2fEMK3pI/lkvdq6YRY=; b=Cn+03LONwtG+Of1WWd5Sv0e/Bm/vSLXENWA23yltT7q5Xg0AenRAbXSt3XbvrfKvlI qYB4jpCFiFmWEKLwQHNVpNLNMwQN5kLzeGlSc/pm9erL6dzdX6O6lx5FQUKDQq/3rE9w hnBGToNMq7lmCsH6MHvKqaaiz9ix9N7qIuIC8hl7tNSOpAysK37AhiiEfxjE4a5v69ZS rfEesCmeiRP73WpLD4OKCj3VqpCDH4IONrwnKmws3CQU8JH/1brsszotGWpoChxtyE28 K04tkConW7ajQJEigUM9Yt1S3lSJBEHcF8OgWqRkrlVW6dh/Ceb83MtJ7uOxoRs/iQnz 46ZQ== X-Gm-Message-State: AO0yUKWTOe+eHkp3GBbyv46rHYnPw4Qtm0pAww1ktUTX7VormDLkAtNC A/ATetJ/RBu6VLN7fMp+O5/4BQXqtnlWVld189r1FQ== X-Google-Smtp-Source: AK7set9ctzdeAoQ88jVj5mEUe9+FXCJBAVdNgtE1isDn99pH+BUnLt1351hUJ6UfhJw5PoX1akPVzOLBv9e/c82stI8= X-Received: by 2002:a37:9a47:0:b0:719:feed:34c4 with SMTP id c68-20020a379a47000000b00719feed34c4mr323715qke.223.1674986339813; Sun, 29 Jan 2023 01:58:59 -0800 (PST) MIME-Version: 1.0 References: <20221221034152.30628-1-changfengnan@bytedance.com> In-Reply-To: From: Fengnan Chang Date: Sun, 29 Jan 2023 17:58:48 +0800 Message-ID: Subject: Re: [PATCH v2] eal: cleanup alarm and multiprocess hotplug before memory detach To: thomas@monjalon.net, david.marchand@redhat.com Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sun, 29 Jan 2023 21:46:29 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org friendly ping Fengnan Chang =E4=BA=8E2023=E5=B9=B41=E6=9C=88= 6=E6=97=A5=E5=91=A8=E4=BA=94 11:00=E5=86=99=E9=81=93=EF=BC=9A > > Hi: > is there any comments? > > Fengnan Chang =E4=BA=8E2022=E5=B9=B412=E6=9C= =8821=E6=97=A5=E5=91=A8=E4=B8=89 11:41=E5=86=99=E9=81=93=EF=BC=9A > > > > Alarm and multiprocess hotplug still need access hugepage memory, > > if alarm event processed after memory detach, it may cause SEGV. > > So cleanup alarm and multiprocess hotplug before memory detach. > > > > Fixes: 90b13ab8d4f7 ("alarm: remove direct access to interrupt handle") > > Fixes: a0cc7be20dd1 ("mem: cleanup multiprocess resources") > > > > Signed-off-by: Fengnan Chang > > --- > > lib/eal/freebsd/eal.c | 2 +- > > lib/eal/linux/eal.c | 4 ++-- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c > > index 1b58cd3da6..83b99c601f 100644 > > --- a/lib/eal/freebsd/eal.c > > +++ b/lib/eal/freebsd/eal.c > > @@ -897,9 +897,9 @@ rte_eal_cleanup(void) > > eal_bus_cleanup(); > > rte_trace_save(); > > eal_trace_fini(); > > + rte_eal_alarm_cleanup(); > > /* after this point, any DPDK pointers will become dangling */ > > rte_eal_memory_detach(); > > - rte_eal_alarm_cleanup(); > > eal_cleanup_config(internal_conf); > > return 0; > > } > > diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c > > index 8c118d0d9f..c76f026023 100644 > > --- a/lib/eal/linux/eal.c > > +++ b/lib/eal/linux/eal.c > > @@ -1372,11 +1372,11 @@ rte_eal_cleanup(void) > > eal_bus_cleanup(); > > rte_trace_save(); > > eal_trace_fini(); > > + eal_mp_dev_hotplug_cleanup(); > > + rte_eal_alarm_cleanup(); > > /* after this point, any DPDK pointers will become dangling */ > > rte_eal_memory_detach(); > > - eal_mp_dev_hotplug_cleanup(); > > rte_eal_malloc_heap_cleanup(); > > - rte_eal_alarm_cleanup(); > > eal_cleanup_config(internal_conf); > > rte_eal_log_cleanup(); > > return 0; > > -- > > 2.37.0 (Apple Git-136) > >