All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch 4/6] slub: avoid compiling SLAB_CACHE_DMA without DMA support
Date: Wed, 25 May 2011 16:34:48 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1105251629020.29729@chino.kir.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1105250957180.23309@router.home>

On Wed, 25 May 2011, Christoph Lameter wrote:

> > If CONFIG_ZONE_DMA is disabled, SLAB_CACHE_DMA is a no-op.  Avoid
> > compiling support for it on such a configuration.
> 
> Setting SLAB_CACHE_DMA to zero in the !ZONE_DMA case could avoid some of
> the ifdeffery.
> 

That doesn't actually accomplish anything since all SLAB_CACHE_DMA does is 
set SLUB_DMA, which is already 0 in slub_def.h without CONFIG_ZONE_DMA:

	#ifdef CONFIG_ZONE_DMA
	#define SLUB_DMA __GFP_DMA  
	#else
	/* Disable DMA functionality */
	#define SLUB_DMA (__force gfp_t)0
	#endif

So doing the same for SLAB_CACHE_DMA wouldn't do anything.  The point of 
the patchset is to break the build if SLAB_CACHE_DMA is passed to 
kmem_cache_create() and the kernel is not compiled for DMA support.  That 
should result in a build breakage rather than silently not supporting DMA 
slab caches since it needs to be corrected at build.

  reply	other threads:[~2011-05-25 23:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 23:53 [patch 1/6] s390, block: disable fixed buffer mode when DMA support is disabled David Rientjes
2011-05-24 23:53 ` [patch 2/6] scsi: warn and avoid creating dma caches if " David Rientjes
2011-05-24 23:53 ` [patch 3/6] scsi, fnic: require DMA support for Cisco FNIC David Rientjes
2011-05-25  8:04   ` Christoph Hellwig
2011-05-25 19:28     ` Roland Dreier
2011-05-25 23:35       ` Abhijeet Joglekar (abjoglek)
2011-05-25 23:35         ` Abhijeet Joglekar (abjoglek)
2011-05-25 23:40         ` David Rientjes
2011-05-24 23:53 ` [patch 4/6] slub: avoid compiling SLAB_CACHE_DMA without DMA support David Rientjes
2011-05-25 14:58   ` Christoph Lameter
2011-05-25 23:34     ` David Rientjes [this message]
2011-05-24 23:53 ` [patch 5/6] slab: " David Rientjes
2011-05-24 23:53 ` [patch 6/6] slab: only define SLAB_CACHE_DMA for CONFIG_ZONE_DMA David Rientjes
2011-05-25 10:49   ` Heiko Carstens
2011-05-25 15:02     ` Christoph Lameter
2011-05-25 23:37     ` David Rientjes
2011-05-25  7:24 ` [patch 1/6] s390, block: disable fixed buffer mode when DMA support is disabled Heiko Carstens

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.1105251629020.29729@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@kernel.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 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.