[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DF3A376.1000601@gmail.com>
Date: Sat, 11 Jun 2011 11:18:46 -0600
From: Robert Hancock <hancockrwd@...il.com>
To: Catalin Marinas <catalin.marinas@....com>
CC: David Rientjes <rientjes@...gle.com>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
tglx@...utronix.de, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, mel@....ul.ie,
kamezawa.hiroyu@...fujitsu.com, riel@...hat.com, pavel@....cz
Subject: Re: [PATCH] Make GFP_DMA allocations w/o ZONE_DMA emit a warning
instead of failing
On 06/11/2011 03:45 AM, Catalin Marinas wrote:
> On Fri, Jun 10, 2011 at 03:30:35PM -0700, David Rientjes wrote:
>> On Fri, 10 Jun 2011, Russell King - ARM Linux wrote:
>>> 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?
>>
>> It all depends on the wording of the "warning", it should make it clear
>> that this is not always an error condition and only affects certain types
>> of hardware which the user may or may not have.
>
> I think people will still be worried when they get a warning. And there
> are lots of platforms that don't need ZONE_DMA just because devices can
> access the full RAM. As Russell said, same drivers may be used on
> platforms that can actually do DMA only to certain areas of memory and
> require ZONE_DMA (there are several examples on ARM).
>
> If you want, you can add something like CONFIG_ARCH_HAS_ZONE_DMA across
> all the platforms that support ZONE_DMA and only get the warning if
> ZONE_DMA is available but not enabled.
It sounds to me like these drivers using GFP_DMA should really be fixed
to use the proper DMA API. That's what it's there for. The problem is
that GFP_DMA doesn't really mean anything generically other than "memory
suitable for DMA according to some criteria". On x86 it means low 16MB,
on some other platforms it presumably means other things, on others it
means nothing at all. It's quite likely that a driver that requests
GFP_DMA isn't likely to get exactly what it wants on all platforms (for
example on x86 the allocation will be constrained to the low 16MB which
is unnecessarily restrictive for most devices).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists