linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: akpm@osdl.org
Cc: linux-mm@kvack.org
Subject: No GFP_DMA check in the slab if no CONFIG_ZONE_DMA is set
Date: Mon, 16 Oct 2006 17:43:54 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0610161739560.10676@schroedinger.engr.sgi.com> (raw)

The GFP_DMA check in the slab is not necessary if there is no ZONE_DMA available.

The SCSI layer still sets GFP_DMA just in case which may cause the
BUG_ON to fire although there cannot be a an issue since systems with 
CONFIG_ZONE_DMA off have no DMA restrictions.

This bug was triggered by Paul Jackson on an SGI Altix system. Altix never 
had any memory below 4G (meaning of ZONE_DMA on ia64) and the driver has
been working for ages.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6.19-rc1-mm1/mm/slab.c
===================================================================
--- linux-2.6.19-rc1-mm1.orig/mm/slab.c	2006-10-16 03:42:42.000000000 -0500
+++ linux-2.6.19-rc1-mm1/mm/slab.c	2006-10-16 18:47:43.900899030 -0500
@@ -2624,10 +2624,12 @@ static void cache_init_objs(struct kmem_
 
 static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags)
 {
+#ifdef CONFIG_ZONE_DMA
 	if (flags & SLAB_DMA)
 		BUG_ON(!(cachep->gfpflags & GFP_DMA));
 	else
 		BUG_ON(cachep->gfpflags & GFP_DMA);
+#endif
 }
 
 static void *slab_get_obj(struct kmem_cache *cachep, struct slab *slabp,

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2006-10-17  0:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.64.0610161739560.10676@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.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