[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH][RFC] uClinux slab limits
Christoph Hellwig wrote:
>
> +#ifndef CONFIG_MMU
> + CN("size-262144"),
> + CN("size-524288"),
> + CN("size-1048576"),
> +#ifdef CONFIG_LARGE_ALLOCS
> + CN("size-2097152"),
> + CN("size-4194304"),
> + CN("size-8388608"),
> + CN("size-16777216"),
> + CN("size-33554432"),
> +#endif /* CONFIG_LARGE_ALLOCS */
> +#endif /* CONFIG_MMU */
> };
> #undef CN
>
You could just do:
#if CONFIG_LARGEST_SLAB_ORDER >= 20
CN("size-1048576"),
#endif
#if CONFIG_LARGEST_SLAB_ORDER >= 21
CN("size-2097152"),
#endif
#if CONFIG_LARGEST_SLAB_ORDER >= 22
CN("size-4194304"),
#endif
etcetera.
But I think it'd be better to just remove those statically initialised
tables and put a good old for-loop in kmem_cache_init().
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/