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 C1C66423AC; Wed, 11 Jan 2023 10:39:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71C6440691; Wed, 11 Jan 2023 10:39:32 +0100 (CET) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by mails.dpdk.org (Postfix) with ESMTP id 38A1C4021F for ; Fri, 6 Jan 2023 04:01:00 +0100 (CET) Received: by mail-qv1-f50.google.com with SMTP id t13so243845qvp.9 for ; Thu, 05 Jan 2023 19:01: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=tr+wvDZ6/FZDRY6lIkdlWmZR7C3rDAWdWoiiHMOPWTo=; b=XTVI6tC6Q1Mk94IIaElUJqyaVpWsNjI84uQxeW+OTM2FADXC1JewgvrynkapTRn5OA tM37TWlS/uXBoLNClAld++GTRGKLeK5zNwD2IkVCxWcD/iFfEfG0+5NUsIbZvVncoPBp NNcyrS4nPzo2xJu+7XN7jbXJX8jMqTxTcUj+8nZFIQS2OWFLTnrDu1RZxAStoRdjyerk inbKRCw1c+NiNzypjAs6cEsFKA3DzivfQ+O3TS3+eLkvF12HH3O59eI9nRaA2qeG6mq9 CplWJ3AlZYR80wbXkJ+UfRzIXYIWqv5BscHSdRS9kxQYAgxHJVr7wF1IR1rFSLUo4JWg BbOA== 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=tr+wvDZ6/FZDRY6lIkdlWmZR7C3rDAWdWoiiHMOPWTo=; b=j7+Vfz2KJ8KEbe8GXveIJRJ8FaIry3NcOp44b3CbQbTjNHqYjwG7kHwHw58tSKzn0+ GCcIFGON0XRrNb5g3loXd3BA1GrJ0QjBUmpRmyB9ntCAEZftlwP47+K/wdbeUvLE3FSq fqq0m/9OuyQlaiRFxAQTzQqhhoAGgA6zBcO36+Yvep2zsdpFjrl8lh0CnnMrqewSpcCO Bvpp8RQWtS1qEpmTOGZZcPZZsuVKjZzEsf2s6h4VCjHmdEEiPKosLJN+r8KqCf+vtxRD HNY7S8GU8y5J2EJip35SGHnI6nsJkIvupou2mPN0EmFVaPfniL2cr1jBEWLwAgpE8+Zf 5c9w== X-Gm-Message-State: AFqh2ko6kkK2rlXBVH8ld1LdujA7MbgWJirAuRg9RiGAARVm6GrLkdcs NFRAVPj14u6LjO1Bg2xSX0xJC7ZvGSw2/CB8i+LSWA== X-Google-Smtp-Source: AMrXdXv/QkmRkoCbdwKIT2/tTAAZiCOZMtoThC5l06mGbdl5aXOUEOUoslumCG0122lwkJRFU8PbRA9ZuphvS094DBY= X-Received: by 2002:a0c:e783:0:b0:531:94d7:a42c with SMTP id x3-20020a0ce783000000b0053194d7a42cmr1205551qvn.93.1672974060387; Thu, 05 Jan 2023 19:01:00 -0800 (PST) MIME-Version: 1.0 References: <20221221034152.30628-1-changfengnan@bytedance.com> In-Reply-To: <20221221034152.30628-1-changfengnan@bytedance.com> From: Fengnan Chang Date: Fri, 6 Jan 2023 11:00:49 +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: Wed, 11 Jan 2023 10:39:30 +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 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) >