From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4F982B0C0 for ; Tue, 24 Jun 2014 16:54:57 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 24 Jun 2014 07:49:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,538,1400050800"; d="scan'208";a="552578969" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga001.fm.intel.com with ESMTP; 24 Jun 2014 07:55:12 -0700 Received: from irsmsx151.ger.corp.intel.com (163.33.192.59) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 24 Jun 2014 15:55:09 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.31]) by IRSMSX151.ger.corp.intel.com ([163.33.192.59]) with mapi id 14.03.0123.003; Tue, 24 Jun 2014 15:55:09 +0100 From: "De Lara Guarch, Pablo" To: Robert Sanford , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 0/2] malloc: fix malloc and free linear complexity Thread-Index: AQHPjyjGqxaLNSKr5E2jZO+It/4d8JuAWaLw Date: Tue, 24 Jun 2014 14:55:08 +0000 Message-ID: References: <1400245141-10938-1-git-send-email-rsanford2@gmail.com> <1403558230-40042-1-git-send-email-rsanford2@gmail.com> In-Reply-To: <1403558230-40042-1-git-send-email-rsanford2@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 0/2] malloc: fix malloc and free linear complexity X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 14:54:57 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Robert Sanford > Sent: Monday, June 23, 2014 10:17 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v3 0/2] malloc: fix malloc and free linear > complexity >=20 > Comments on previous versions of this patch: > http://dpdk.org/ml/archives/dev/2014-May/002297.html > http://dpdk.org/ml/archives/dev/2014-June/003518.html >=20 > Additional changes from original to v3: > * Reduce the minimum-sized block that we put on a free list when > splitting a larger block, from 192 to 64. Although memory is > plentiful, why waste 64 and 128-byte (plus overhead) blocks? >=20 > -#define MIN_DATA_SIZE (CACHE_LINE_SIZE * 2) > +#define MIN_DATA_SIZE (CACHE_LINE_SIZE) >=20 > - if (old_elem_size <=3D MALLOC_ELEM_OVERHEAD + MIN_DATA_SIZE){ > + if (old_elem_size < MALLOC_ELEM_OVERHEAD + MIN_DATA_SIZE){ >=20 > - if (elem->size - new_size > MIN_DATA_SIZE + > MALLOC_ELEM_OVERHEAD){ > + if (elem->size - new_size >=3D MIN_DATA_SIZE + > MALLOC_ELEM_OVERHEAD){ >=20 > Changes from v2 to v3: > * Change the size ranges of the five free lists per heap. The first > list will effectively contain blocks of size [64,256]. Acked-by: Pablo de Lara Thanks, Pablo