All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org,
	David Rientjes <rientjes@google.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Mel Gorman <mel@csn.ul.ie>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] Make GFP_DMA allocations w/o ZONE_DMA emit a warning instead of failing
Date: Wed,  1 Jun 2011 14:04:32 +0400	[thread overview]
Message-ID: <1306922672-9012-1-git-send-email-dbaryshkov@gmail.com> (raw)

Please be more polite to other people. After a197b59ae6 all allocations
with GFP_DMA set on nodes without ZONE_DMA fail nearly silently (only
one warning during bootup is emited, no matter how many things fail).
This is a very crude change on behaviour. To be more civil, instead of
failing emit noisy warnings each time smbd. tries to allocate a GFP_DMA
memory on non-ZONE_DMA node.

This change should be reverted after one or two major releases, but
we should be more accurate rather than hoping for the best.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 mm/page_alloc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a4e1db3..e22dd4e 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2248,8 +2248,9 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
 	if (should_fail_alloc_page(gfp_mask, order))
 		return NULL;
 #ifndef CONFIG_ZONE_DMA
-	if (WARN_ON_ONCE(gfp_mask & __GFP_DMA))
-		return NULL;
+	/* Change this back to hard failure after 3.0 or 3.1. For now give
+	 * drivers people a chance to fix their drivers w/o causing breakage. */
+	WARN_ON(gfp_mask & __GFP_DMA);
 #endif
 
 	/*
-- 
1.7.4.4


WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org,
	David Rientjes <rientjes@google.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Mel Gorman <mel@csn.ul.ie>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] Make GFP_DMA allocations w/o ZONE_DMA emit a warning instead of failing
Date: Wed,  1 Jun 2011 14:04:32 +0400	[thread overview]
Message-ID: <1306922672-9012-1-git-send-email-dbaryshkov@gmail.com> (raw)

Please be more polite to other people. After a197b59ae6 all allocations
with GFP_DMA set on nodes without ZONE_DMA fail nearly silently (only
one warning during bootup is emited, no matter how many things fail).
This is a very crude change on behaviour. To be more civil, instead of
failing emit noisy warnings each time smbd. tries to allocate a GFP_DMA
memory on non-ZONE_DMA node.

This change should be reverted after one or two major releases, but
we should be more accurate rather than hoping for the best.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 mm/page_alloc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a4e1db3..e22dd4e 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2248,8 +2248,9 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
 	if (should_fail_alloc_page(gfp_mask, order))
 		return NULL;
 #ifndef CONFIG_ZONE_DMA
-	if (WARN_ON_ONCE(gfp_mask & __GFP_DMA))
-		return NULL;
+	/* Change this back to hard failure after 3.0 or 3.1. For now give
+	 * drivers people a chance to fix their drivers w/o causing breakage. */
+	WARN_ON(gfp_mask & __GFP_DMA);
 #endif
 
 	/*
-- 
1.7.4.4

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

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 10:04 Dmitry Eremin-Solenikov [this message]
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 12:38   ` KOSAKI Motohiro
2011-06-01 15:07   ` Dmitry Eremin-Solenikov
2011-06-01 15:07     ` Dmitry Eremin-Solenikov
2011-06-01 17:23     ` David Rientjes
2011-06-01 17:23       ` David Rientjes
2011-06-01 18:19       ` Russell King - ARM Linux
2011-06-01 18:19         ` Russell King - ARM Linux
2011-06-01 18:55         ` Thomas Gleixner
2011-06-01 18:55           ` Thomas Gleixner
2011-06-01 19:09           ` David Rientjes
2011-06-01 19:09             ` David Rientjes
2011-06-01 19:46             ` Thomas Gleixner
2011-06-01 19:46               ` Thomas Gleixner
2011-06-10  7:38               ` KOSAKI Motohiro
2011-06-10  7:38                 ` KOSAKI Motohiro
2011-06-10  7:43                 ` Andrew Morton
2011-06-10  7:43                   ` Andrew Morton
2011-06-10  7:52                   ` KOSAKI Motohiro
2011-06-10  7:52                     ` KOSAKI Motohiro
2011-06-10  8:11                   ` Dmitry Eremin-Solenikov
2011-06-10  8:11                     ` Dmitry Eremin-Solenikov
2011-06-10  9:12                     ` Russell King - ARM Linux
2011-06-10  9:12                       ` Russell King - ARM Linux
2011-06-10 18:54                       ` David Rientjes
2011-06-10 18:54                         ` David Rientjes
2011-06-10 18:58                         ` Russell King - ARM Linux
2011-06-10 18:58                           ` Russell King - ARM Linux
2011-06-10 22:01                           ` David Rientjes
2011-06-10 22:01                             ` David Rientjes
2011-06-10 22:07                             ` Russell King - ARM Linux
2011-06-10 22:07                               ` Russell King - ARM Linux
2011-06-10 22:16                               ` David Rientjes
2011-06-10 22:16                                 ` David Rientjes
2011-06-10 22:20                                 ` Russell King - ARM Linux
2011-06-10 22:20                                   ` Russell King - ARM Linux
2011-06-10 22:30                                   ` David Rientjes
2011-06-10 22:30                                     ` David Rientjes
2011-06-11  9:45                                     ` Catalin Marinas
2011-06-11  9:45                                       ` Catalin Marinas
2011-06-11 17:18                                       ` Robert Hancock
2011-06-11 17:18                                         ` Robert Hancock
2011-06-12 13:48                                         ` Russell King - ARM Linux
2011-06-12 13:48                                           ` Russell King - ARM Linux
2011-06-01 18:30       ` Dmitry Eremin-Solenikov
2011-06-01 18:30         ` Dmitry Eremin-Solenikov
2011-06-01 18:42         ` David Rientjes
2011-06-01 18:42           ` David Rientjes
2011-06-02 21:46   ` Pavel Machek
2011-06-02 21:46     ` Pavel Machek
2011-06-12 11:07     ` Rafael J. Wysocki
2011-06-12 11:07       ` Rafael J. Wysocki
2011-06-12 11:33       ` Cyril Hrubis
2011-06-12 11:33         ` Cyril Hrubis
2011-06-12 11:39         ` Rafael J. Wysocki
2011-06-12 11:39           ` Rafael J. Wysocki
2011-06-10 22:24 ` Linus Torvalds
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=1306922672-9012-1-git-send-email-dbaryshkov@gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --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=riel@redhat.com \
    --cc=rientjes@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.