Re: [PATCH] Make GFP_DMA allocations w/o ZONE_DMA emit a warning instead of failing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 10, 2011 at 03:16:00PM -0700, David Rientjes wrote:
> On Fri, 10 Jun 2011, Russell King - ARM Linux wrote:
> 
> > > We're talking about two different things.  Linus is saying that if GFP_DMA 
> > > should be a no-op if the hardware doesn't require DMA memory because the 
> > > kernel was correctly compiled without CONFIG_ZONE_DMA.  I'm asking about a 
> > > kernel that was incorrectly compiled without CONFIG_ZONE_DMA and now we're 
> > > returning memory from anywhere even though we actually require GFP_DMA.
> > 
> > How do you distinguish between the two states?  Answer: you can't.
> > 
> 
> By my warning which says "enable CONFIG_ZONE_DMA _if_ needed."  The 
> alternative is to silently return memory from anywhere, which is what the 
> page allocator does now, which doesn't seem very user friendly when the 
> device randomly works depending on the chance it was actually allocated 
> from the DMA mask.  If it actually wants DMA and the kernel is compiled 
> incorrectly, then I think a single line in the kernel log would be nice to 
> point them in the right direction.  Users who disable the option usually 
> know what they're doing (it's only allowed for CONFIG_EXPERT on x86, for 
> example), so I don't think they'll mind the notification and choose to 
> ignore it.

So those platforms which don't have a DMA zone, don't have any problems
with DMA, yet want to use the very same driver which does have a problem
on ISA hardware have to also put up with a useless notification that
their kernel might be broken?

Are you offering to participate on other architectures mailing lists to
answer all the resulting queries?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]