Re: CMA alignment question
From: Michal Nazarewicz
Date: Thu Nov 06 2014 - 07:29:55 EST
On Thu, Nov 06 2014, Weijie Yang <weijie.yang.kh@xxxxxxxxx> wrote:
> I agree the current code doesn't handle this issue properly.
> However, I prefer to add specific usage to CMA interface rather than
> modify the cma code, Because the latter hide the issue and could waste
> memory.
cma_alloc should handle whatever alignment caller uses. Sure, if CMA
area has smaller alignment this may lead to wasted memory, but so can
allocation with small alignment followed by allocation with big
alignment.
If you're saying that platform should try to get the CMA area aligned
such that no alignment offset happens I agree. If you're saying that
cma_alloc should fail (to properly align) an allocation request,
I disagree.
--
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--
--
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/