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 38FFD41CA8; Wed, 15 Feb 2023 18:16:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28D8040A7D; Wed, 15 Feb 2023 18:16:19 +0100 (CET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 604014067E for ; Wed, 15 Feb 2023 18:16:18 +0100 (CET) Received: by mail-pf1-f170.google.com with SMTP id b1so13218554pft.1 for ; Wed, 15 Feb 2023 09:16:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=vpbcwZgNM2AWcbf7yCzR2pYupsUAWXTsoWwJWZWI6Kk=; b=t0oTRIduOqglxF3TIQa2mJCMpwHi4mXSrUo+cl+DcuuzCpuftz+cE3zU3SIcRzuP8J dxsdDbArhSwa9bD0DH2LH1Zg3HFRobgoeR/Adn19Nf5yc44Qkd4xIFODyECpO0CsGDln xI1DrpeuxbW2+i0WeENRZ/JkLx5P/5dyJl4wtE5UjU1sbUI1vdLQLRYCpNgJcgV/N7xU q3oC3zbMFgtqEYFRO+JPmIjvnCIxCHIzZWKI0N12J7O/tjYmMHEeUTQDUKsZI0fkPPTi 1xyqqIZibK5bTWo/RnpkvH8pzad2eWyZikIAWjrDmFXCgAZZUn9a5F2KKY7DCuXc0llr R03A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vpbcwZgNM2AWcbf7yCzR2pYupsUAWXTsoWwJWZWI6Kk=; b=2EqLjc6VCvc+aGpExzggfCN0UDU/k0WRJX2ZJJfaXih6KbuXKMN9hlFvH+wRfeixSP ZBKupmqdxPKA4l6tmVZXlLYlgdDOg3hrTHa4P2JxM53fWuNXsLy6vzfbtu2mmhw5KPUZ ukWK20Q/yL1lP8OluPfTbhCNUE/nqSgA1slU4T+ItKTYMTLXAsQ1LYKDXEXJ/Lcx3/BS Kfo/c4XDgvLnyvF7kiH5VinaSby94DrhYGemK41AHc60zl1Hda4oA+nBvNkCczeeLR/t WnwK3vtTlYbG1ivRfNF0TRQyFmMVJ/37O8QG4GFKv3o5c1Iqn0eLWKJpUTyMqjYY5JMM UenQ== X-Gm-Message-State: AO0yUKUy1WpASySEbk7s4fMTmaHF5JkxW7rb/0col9CbR/TWNghGtmi3 xOAICjXIB70ZHKMN3zbMiCYi9g== X-Google-Smtp-Source: AK7set8/PBhMcEv/5iQH10nom8iRkaLD7lDGQF9UFCkrgCYd6hzXvkS5dp277+czoKOlNvfgexGQtg== X-Received: by 2002:a62:1c58:0:b0:5a8:ae9e:de20 with SMTP id c85-20020a621c58000000b005a8ae9ede20mr2155645pfc.30.1676481377502; Wed, 15 Feb 2023 09:16:17 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id a22-20020a62bd16000000b00580a0bb411fsm12243831pff.174.2023.02.15.09.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 09:16:17 -0800 (PST) Date: Wed, 15 Feb 2023 09:16:16 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Thomas Monjalon" , , "Fengnan Chang" , , , , , , , , "Fidaullah Noonari" Subject: Re: [PATCH] malloc: fix malloc performance may becomes worse as the number of malloc increases Message-ID: <20230215091616.1217c509@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D8773F@smartserver.smartshare.dk> References: <20230210063022.52171-1-changfengnan@bytedance.com> <2134819.GUh0CODmnK@thomas> <98CBD80474FA8B44BF855DF32C47DC35D8773F@smartserver.smartshare.dk> MIME-Version: 1.0 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 On Wed, 15 Feb 2023 12:10:23 +0100 Morten Br=C3=B8rup wrote: > Looking isolated at the patch itself... >=20 > I agree with the way the patch modifies the ranges of the free list, and = the consequential removal of the "- 1" from the calculation of log2. >=20 > Intuitively, the lists should cover ranges such as [0x100..0x3FF], which = this patch does, not [0x101..0x400], how it was previously... The ranges wi= th this patch make much more sense. >=20 > So if the existing code is otherwise correct, i.e. handles the size with/= without MALLOC_ELEM_HEADER_LEN correctly, my gut feeling says this patch is= an improvement. >=20 > Acked-by: Morten Br=C3=B8rup It would be good to have a malloc performance test. Possibly something reused from some other project.