Messages in this thread | | | From | Michal Nazarewicz <> | Subject | Re: CMA alignment question | Date | Thu, 06 Nov 2014 13:29:42 +0100 |
| |
On Thu, Nov 06 2014, Weijie Yang <weijie.yang.kh@gmail.com> 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@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |