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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href