linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: 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: Fri, 10 Jun 2011 15:01:15 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1106101456080.23076@chino.kir.corp.google.com> (raw)
In-Reply-To: <20110610185858.GN24424@n2100.arm.linux.org.uk>

On Fri, 10 Jun 2011, Russell King - ARM Linux wrote:

> > > > Should one submit a patch adding a warning to GFP_DMA allocations
> > > > w/o ZONE_DMA, or the idea of the original patch is wrong?
> > > 
> > > Linus was far from impressed by the original commit, saying:
> > > | Using GFP_DMA is reasonable in a driver - on platforms where that
> > > | matters, it should allocate from the DMA zone, on platforms where it
> > > | doesn't matter it should be a no-op.
> > > 
> > > So no, not even a warning.
> > > 
> > 
> > Any words of wisdom for users with CONFIG_ZONE_DMA=n that actually use 
> > drivers where they need GFP_DMA?  The page allocator should just silently 
> > return memory from anywhere?
> 
> See Linus' reply.  I quote again "on platforms where it doesn't matter it
> should be a no-op".  If _you_ have a problem with that _you_ need to
> discuss it with _Linus_, not me.  I'm not going to be a middle-man sitting
> between two people with different opinions.
> 

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.

If you don't want to form an opinion of your own, then I have no problem 
cc'ing Linus on it.  I don't think he'd object to a

	#ifndef CONFIG_ZONE_DMA
	WARN_ON_ONCE(1, "%s (%d): allocating DMA memory without DMA support -- "
			"enable CONFIG_ZONE_DMA if needed.\n",
			current->comm, current->pid);
	#endif

--
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-10 22:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 10:04 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 [this message]
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
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=alpine.DEB.2.00.1106101456080.23076@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --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=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