Re: [RFC][PATCH] CMA: drivers/base/Kconfig: restrict CMA size to non-zero value

From: Gioh Kim
Date: Mon May 19 2014 - 22:27:04 EST



2014-05-20 ìì 10:28, Michal Nazarewicz ì ê:
On Mon, May 19 2014, Gioh Kim wrote:
If CMA option is not selected, __alloc_from_contiguous would not be
called. We don't need to the fallback allocation.

And if CMA option is selected and initialized correctly,
the cma allocation can fail in case of no-CMA-memory situation.
I thinks in that case we don't need to the fallback allocation also,
because it is normal case.

Therefore I think the restriction of CMA size option and make CMA work
can cover every cases.

Wait, you just wrote that if CMA is not initialised correctly, it's fine
for atomic pool initialisation to fail, but if CMA size is initialised
correctly but too small, this is somehow worse situation? I'm a bit
confused to be honest.

I'm sorry to confuse you.
Please forgive my poor English.
My point is atomic_pool should be able to work with/without CMA.



IMO, cma=0 command line argument should be supported, as should having
the default CMA size zero. If CMA size is set to zero, kernel should
behave as if CMA was not enabled at compile time.

It's also good if atomic_pool can work well with zero CMA size.

I can give up my patch.
But Joonsoo's patch should be applied.

Joonsoo, can you please send the full patch to maintainers?




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