From: akpm@linux-foundation.org Subject: [nacked] idr-reduce-the-number-of-max_idr_free.patch removed from -mm tree Date: Tue, 22 Apr 2014 13:02:38 -0700 Message-ID: <5356cade.b6Gimscb+9aH74Qr%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:49173 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755249AbaDVUCj (ORCPT ); Tue, 22 Apr 2014 16:02:39 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, tj@kernel.org, laijs@cn.fujitsu.com Subject: [nacked] idr-reduce-the-number-of-max_idr_free.patch removed from -mm tree To: laijs@cn.fujitsu.com,tj@kernel.org,mm-commits@vger.kernel.org From: akpm@linux-foundation.org Date: Tue, 22 Apr 2014 13:02:38 -0700 The patch titled Subject: idr: reduce the number of MAX_IDR_FREE has been removed from the -mm tree. Its filename was idr-reduce-the-number-of-max_idr_free.patch This patch was dropped because it was nacked ------------------------------------------------------ From: Lai Jiangshan Subject: idr: reduce the number of MAX_IDR_FREE Whe need to prepare MAX_IDR_FREE idr_layers for allocation. But when idr is not empty, we need at most (MAX_IDR_LEVEL - 1) idr_layers to build up and at most (MAX_IDR_LEVEL - 1) idr_layers to allocate down. When idr is empty we need at most MAX_IDR_LEVEL layers. So max((MAX_IDR_LEVEL * 2 - 2), MAX_IDR_LEVEL) idr_layers is enough. Signed-off-by: Lai Jiangshan Cc: Tejun Heo Signed-off-by: Andrew Morton --- lib/idr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff -puN lib/idr.c~idr-reduce-the-number-of-max_idr_free lib/idr.c --- a/lib/idr.c~idr-reduce-the-number-of-max_idr_free +++ a/lib/idr.c @@ -38,8 +38,13 @@ /* Leave the possibility of an incomplete final layer */ #define MAX_IDR_LEVEL ((MAX_IDR_SHIFT + IDR_BITS - 1) / IDR_BITS) -/* Number of id_layer structs to leave in free list */ -#define MAX_IDR_FREE (MAX_IDR_LEVEL * 2) +/* + * Number of idr_layer structs to leave in free list. + * When idr is not empty, we need atmost (MAX_IDR_LEVEL - 1) idr_layers + * to build up and atmost (MAX_IDR_LEVEL - 1) idr_layers to allocate down. + * When idr is empty need atmost MAX_IDR_LEVEL layers. + */ +#define MAX_IDR_FREE max((MAX_IDR_LEVEL * 2 - 2), MAX_IDR_LEVEL) static struct kmem_cache *idr_layer_cache; static DEFINE_PER_CPU(struct idr_layer *, idr_preload_head); _ Patches currently in -mm which might be from laijs@cn.fujitsu.com are mem-hotplug-implement-get-put_online_mems.patch slab-get_online_mems-for-kmem_cache_createdestroyshrink.patch idr-fix-overflow-bug-during-maximum-id-calculation-at-maximum-height.patch idr-fix-unexpected-id-removal-when-idr_removeunallocated_id.patch idr-fix-null-pointer-dereference-when-ida_removeunallocated_id.patch idr-fix-idr_replaces-returned-error-code.patch idr-dont-need-to-shink-the-free-list-when-idr_remove.patch idr-reduce-the-unneeded-check-in-free_layer.patch ida-in-place-ida-allocation.patch idr-reorder-the-fields.patch linux-next.patch