Re: [PATCH v4 2/3] common: DMA-mapping: add DMA_ATTR_NOHUGEPAGE attribute
From: Christoph Hellwig
Date: Sat Jan 09 2016 - 02:55:57 EST
On Fri, Jan 08, 2016 at 03:31:29PM -0800, Doug Anderson wrote:
> Ah, that makes so much more sense now! :) So you were suggesting
> something like DMA_ATTR_SMALL_PAGES_OK. Then you if we wanted all
> possible states you'd have 0 vs. DMA_ATTR_SMALL_PAGES_OK vs.
> DMA_ATTR_HUGE_PAGE? That would avoid the double-negative but does
> have the downside that it's less obvious that DMA_ATTR_SMALL_PAGES_OK
> is the opposite of DMA_ATTR_HUGE_PAGE.
or DMA_ATTR_4K_PAGES if that's what you want. We have at least 4k, 8k,
16k and 64k page support in the kernel, not sure if 32k and 256k ever
made it mainline. What does your hardware actually require?
This needs to be documented properly and hpefully also reflected in the
name of the fag. Otherwise we'll end up with a giant desaster like
GFP_DMA that means something slightly different on every architecture.