Messages in this thread | | | Date | Tue, 11 Mar 2008 19:49:26 +0100 | From | Andi Kleen <> | Subject | Re: [PATCH] [0/13] General DMA zone rework |
| |
> | Oops. Thanks. I'll double check that. mask allocator indeed doesn't > | handle __GFP_COMP and nobody should be passing that into dma_alloc_coherent > | anyways. But the bug you got was for the small size wasn't it? > > No, it triggers the BUG_ON() which checks the gfp, not the one > which checks MASK_MIN_SIZE.
I see. I misdiagnosed your original problem then. But fixing the size < 16 bytes case was a good idea anyways, someone else would have triggered that.
> > On the other hand I'm not sure whether it does the right thing > (ie, pass size in bytes instead of order) it does:
> > """ > pg = get_order(size); > [...] > res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags);
With the mask allocator it can be changed to pass size directly and save some memory. Before that it didn't make any difference.
Can you perhaps send me a complete patch fixing that for sound and the __GFP_COMP with description and Signed-off-by etc.? I can add it to my patchkit then and you would be correctly attributed. Otherwise I can do it myself too if you prefer. I'll also do a grep over the tree for other such bogus __GFP_COMP users. That was an issue I hadn't considered before.
> if (res != NULL) > inc_snd_pages(pg); > """ > > Maybe it could be changed to:
Agreed.
-Andi
| |