From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by dpdk.org (Postfix) with ESMTP id 7239D6829 for ; Thu, 26 Jun 2014 14:37:30 +0200 (CEST) Received: by mail-wi0-f180.google.com with SMTP id hi2so955732wib.13 for ; Thu, 26 Jun 2014 05:37:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=mlVSNBcpEFEZNfoRCjOCFr7CoVyBJCm5zwiDOvFmZlE=; b=AIACoEtWt3HuV4Dq2kMV8tmyw8AK/3YHPUW/DmKblik3moP2m+M/vHqm9PgrDMbo5Y xW3xKZrmxXmZAJI8/OCSlV+WGvnYlGE0pW3YQ8lg/7Q/UVmenfW4P4DELyYfF81O0nhU 9u7mo8zQQ7Z8mkQS1lVU7UtXQ8HrgErgRiSb5ZFgIiy1jjhU7Gi5wyEw8+wLO4tgr8Vm SoXexX2ut87ppa2mkpMKTpPZO/FBbw1uJev/Dw3xgsTZg5XqlKaQRqx/xHvwU6X1LBoG CLb/wkZ5Q0lggjVXUxPJf9OxXq+Ej193fcHASSqVPaEjexr43jZ0Z50SYwLv+S8leMzZ AJig== X-Gm-Message-State: ALoCoQkVde+BTWCcibGC9Zp14GMURwaH7fEzHVHcSyrYxcItq7I5UkY6UftcESXkrjuC/mmo8uKc X-Received: by 10.194.222.197 with SMTP id qo5mr18241160wjc.78.1403786269437; Thu, 26 Jun 2014 05:37:49 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id bq7sm65488394wib.7.2014.06.26.05.37.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jun 2014 05:37:48 -0700 (PDT) From: Thomas Monjalon To: Robert Sanford Date: Thu, 26 Jun 2014 14:37:43 +0200 Message-ID: <3441267.fPINhng712@xps13> Organization: 6WIND User-Agent: KMail/4.13.1 (Linux/3.14.6-1-ARCH; KDE/4.13.1; x86_64; ; ) In-Reply-To: References: <1400245141-10938-1-git-send-email-rsanford2@gmail.com> <1403558230-40042-1-git-send-email-rsanford2@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org 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: Thu, 26 Jun 2014 12:37:30 -0000 > From: Robert Sanford > > 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 > > > > 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? > > > > -#define MIN_DATA_SIZE (CACHE_LINE_SIZE * 2) > > +#define MIN_DATA_SIZE (CACHE_LINE_SIZE) > > > > - if (old_elem_size <= MALLOC_ELEM_OVERHEAD + MIN_DATA_SIZE){ > > + if (old_elem_size < MALLOC_ELEM_OVERHEAD + MIN_DATA_SIZE){ > > > > - if (elem->size - new_size > MIN_DATA_SIZE + > > MALLOC_ELEM_OVERHEAD){ > > + if (elem->size - new_size >= MIN_DATA_SIZE + > > MALLOC_ELEM_OVERHEAD){ > > > > 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 Applied for version 1.7.0. Thanks for this brave rework. -- Thomas