Re: DMA memory, split_page, BUG_ON(PageCompound()), sound

From: Nick Piggin
Date: Thu Jul 13 2006 - 16:20:40 EST


Takashi Iwai wrote:
At Wed, 12 Jul 2006 11:32:41 +0100,

In which case should ALSA be passing __GFP_COMP to the dma allocator ?

Yes, sorry I didn't answer your question: ALSA basically wants to be
able to have that memory mmapable by userspace programs, and it doesn't
care whether this is via compound pages or split pages.

I would be willing to remove __GFP_COMP if it's not needed :)
Passing this flag is really confusing. The driver doesn't use the
compound pages at all but it was added just to enable mmap support.
So, Nick's proposal appears reasonable to me.

I don't think it would be hard. Just need a bit of thinking about how
to go about composing some sort of GFP_USERMAP that can easily be
handled by all allocators, without costing performance or being too
intrusive.

I suspect I won't have time to wade into such an exercise until after
OLS. But I could give a quick review for anyone who does ;)

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com -
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/