linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Rientjes <rientjes@google.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	tglx@linutronix.de, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, mel@csn.ul.ie,
	kamezawa.hiroyu@jp.fujitsu.com, riel@redhat.com, pavel@ucw.cz
Subject: Re: [PATCH] Make GFP_DMA allocations w/o ZONE_DMA emit a warning instead of failing
Date: Sat, 11 Jun 2011 11:18:46 -0600	[thread overview]
Message-ID: <4DF3A376.1000601@gmail.com> (raw)
In-Reply-To: <20110611094500.GA2356@debian.cable.virginmedia.net>

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  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@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-06-11 17:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 10:04 [PATCH] Make GFP_DMA allocations w/o ZONE_DMA emit a warning instead of failing Dmitry Eremin-Solenikov
2011-06-01 12:38 ` KOSAKI Motohiro
2011-06-01 15:07   ` Dmitry Eremin-Solenikov
2011-06-01 17:23     ` David Rientjes
2011-06-01 18:19       ` Russell King - ARM Linux
2011-06-01 18:55         ` Thomas Gleixner
2011-06-01 19:09           ` David Rientjes
2011-06-01 19:46             ` Thomas Gleixner
2011-06-10  7:38               ` KOSAKI Motohiro
2011-06-10  7:43                 ` Andrew Morton
2011-06-10  7:52                   ` KOSAKI Motohiro
2011-06-10  8:11                   ` Dmitry Eremin-Solenikov
2011-06-10  9:12                     ` Russell King - ARM Linux
2011-06-10 18:54                       ` David Rientjes
2011-06-10 18:58                         ` Russell King - ARM Linux
2011-06-10 22:01                           ` David Rientjes
2011-06-10 22:07                             ` Russell King - ARM Linux
2011-06-10 22:16                               ` David Rientjes
2011-06-10 22:20                                 ` Russell King - ARM Linux
2011-06-10 22:30                                   ` David Rientjes
2011-06-11  9:45                                     ` Catalin Marinas
2011-06-11 17:18                                       ` Robert Hancock [this message]
2011-06-12 13:48                                         ` Russell King - ARM Linux
2011-06-01 18:30       ` Dmitry Eremin-Solenikov
2011-06-01 18:42         ` David Rientjes
2011-06-02 21:46   ` Pavel Machek
2011-06-12 11:07     ` Rafael J. Wysocki
2011-06-12 11:33       ` Cyril Hrubis
2011-06-12 11:39         ` Rafael J. Wysocki
2011-06-10 22:24 ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DF3A376.1000601@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=dbaryshkov@gmail.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mel@csn.ul.ie \
    --cc=pavel@ucw.cz \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).