Re: [RFC][PATCH] CMA: drivers/base/Kconfig: restrict CMA size to non-zero value
From: Michal Nazarewicz
Date: Fri May 16 2014 - 13:45:28 EST
On Fri, May 16 2014, Gioh Kim wrote:
> If CMA_SIZE_MBYTES is allowed to be zero, there should be defense code
> to check CMA is initlaized correctly. And atomic_pool initialization
> should be done by __alloc_remap_buffer instead of
> __alloc_from_contiguous if __alloc_from_contiguous is failed.
Agreed, and this is the correct fix.
> IMPO, it is more simple and powerful to restrict CMA_SIZE_MBYTES_MAX
> configuration to be larger than zero.
No, because it makes it impossible to have CMA disabled by default and
only enabled if command line argument is given.
Furthermore, your patch does *not* guarantee CMA region to always be
allocated. If CMA_SIZE_SEL_PERCENTAGE is selected for instance. Or if
user explicitly passes 0 on command line.
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, MichaÅ âmina86â Nazarewicz (o o)
ooo +--<mpn@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--
Attachment:
signature.asc
Description: PGP signature