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 109384257B; Tue, 12 Sep 2023 11:13:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E47E6406BA; Tue, 12 Sep 2023 11:13:24 +0200 (CEST) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by mails.dpdk.org (Postfix) with ESMTP id E92D6406BA for ; Tue, 12 Sep 2023 11:13:22 +0200 (CEST) Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-412b8e82e25so3005541cf.1 for ; Tue, 12 Sep 2023 02:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1694510002; x=1695114802; darn=dpdk.org; 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=bU/96+eatfXu9cOp2XPxuGbEs/s5p3wW+gdqZ6aR9cU=; b=a4+6oRhPILDapB5Jc4Ck4BI0ZSPgXlIdaFdKS50RCO9h/P82HrdQCdnDQ051kd6r/1 u1Sdbg0xcZrcVX4I5jF5iKBN1Qk0lbo//jl2N/zPrR2wx2g19AN/C0hEbjdxx2PA+rtV TDW93tVhSB1jI/RhU+mt8HoT7aV/FBGSe0o/VzE+J/r4ZzFVcClS+cbPGBP2E1x+RvC/ GNi15Yl16vYjDxsXxmGvT5ulGqDbW1gyfMKQHfGUbwdohyLSXsjerq8VVuAqj0ZPTqxR AI5PqJinBfN2VVtmWP79WlYa6OFk0dMZgRouRmM6fEWC+Ut4hkIRn6Dxg2oMrUdrVakE 0kHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694510002; x=1695114802; 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=bU/96+eatfXu9cOp2XPxuGbEs/s5p3wW+gdqZ6aR9cU=; b=YVHSRbtBtSEp0kK1Gl+r6BXFoTMM5Y1plBNyWazsssq2a+oBeg5zG59lJHeryqmu8K erXs5wnuo4gl/QikCHVs4dZ02N9tNKORzb5YkYty8EV5u9z+MbkOXLRfq6WV5gDfrZIO QBdLvTGDG3JV9FNkqSvBKwcJmYZMEVYiJNUh6p4sCsRuAqxp6JhU7daIb61UdH9EyeqU V0RhWo5k2RUP8HDBaDpf44wAe8iUamZOe2gen2JdHRgGoVPyAFKiDET4thcM/3Nvib8y xQnCDOcqlIBr4RR/lvIVHWdIzFCioS8QTWLeGkxdDwXEeOUxUGtXdXumTDhNBO5NGYVu 7VYA== X-Gm-Message-State: AOJu0YxuvlxVQiTC4gB5fDHF8qYvtzlqeaxP9Hpe+UqX34Yy/C8PVObr LWRsN2cyFV+kkAq0rOTaBY7GeTif3NOAxtzNyp1t10VjC7p+CknWIEg= X-Google-Smtp-Source: AGHT+IGYdnotR6GxgjXKidy8SuTCFyv6Q6hQDhsaxct079AAwDv6VSl9WfW7dpH9VRs7ZMukoLE50REePtVLdc6+alE= X-Received: by 2002:a05:622a:11d4:b0:412:d46:a8c3 with SMTP id n20-20020a05622a11d400b004120d46a8c3mr15354319qtk.2.1694510002377; Tue, 12 Sep 2023 02:13:22 -0700 (PDT) MIME-Version: 1.0 References: <20230831111937.60975-1-changfengnan@bytedance.com> <20230906080819.689bcb8d@hermes.local> In-Reply-To: From: Fengnan Chang Date: Tue, 12 Sep 2023 17:13:11 +0800 Message-ID: Subject: Re: [External] Re: [RFC PATCH] move memset out of hold lock when rte_free To: Stephen Hemminger Cc: anatoly.burakov@intel.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 This problem had fix in this patch http://patches.dpdk.org/project/dpdk/patch/20230912090415.48709-1-changfeng= nan@bytedance.com/ I'm doing long-term test, especially rte_zmalloc. Fengnan Chang =E4=BA=8E2023=E5=B9=B49=E6=9C=88= 12=E6=97=A5=E5=91=A8=E4=BA=8C 10:44=E5=86=99=E9=81=93=EF=BC=9A > > This patch still have problem, I'll fix next version. > > Stephen Hemminger =E4=BA=8E2023=E5=B9=B49=E6= =9C=886=E6=97=A5=E5=91=A8=E4=B8=89 23:08=E5=86=99=E9=81=93=EF=BC=9A > > > > On Thu, 31 Aug 2023 19:19:37 +0800 > > Fengnan Chang wrote: > > > > > +#ifndef RTE_MALLOC_DEBUG > > > + if (internal_conf->legacy_mem) { > > > + /* If orig_elem is dirty, the joint element is clean, w= e need do memset now */ > > > + if (elem->orig_elem->dirty && !elem->dirty) > > > + memset(ptr, 0, data_len); > > > + } else if (!elem->dirty) { > > > + memset(ptr, 0, data_len); > > > + } > > > +#else > > > + /* Always poison the memory in debug mode. */ > > > + memset(ptr, MALLOC_POISON, data_len); > > > +#endif > > > > The code reads better if positive clause was first. > > Got it, I'll do as you suggest in next version. > > I.e. > > > > #ifdef RTE_MALLOC_DEBUG > > /* Always poison the memory in debug mode. */ > > memset(ptr, MALLOC_POISON, data_len); > > #else > > ...