On Tue, Apr 22, 2014 at 06:16:19PM +0800, Lai Jiangshan wrote:
> +/*
> + * 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)

I don't know.  Do we really wanna be this sophiscated about it when
the cost of mistake would be an unexpected id allocation failure which
would *EXTREMELY* difficult to track down or reproduce?  Let's please
keep it dumb and safe.  With preloading we aren't even caching it
per-idr.  I don't think this is something we want to do.

 Nacked-by: Tejun Heo <t...@kernel.org>

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to