[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1010150206190.8103@chino.kir.corp.google.com>
Date: Fri, 15 Oct 2010 02:09:37 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Casey Dahlin <cdahlin@...hat.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch] x86: allow ZONE_DMA to be configurable
On Thu, 14 Oct 2010, Andrew Morton wrote:
> > We've run with it for a couple years, we can even undefine __GFP_DMA to
> > find allocations that we compile into the kernel to ensure we don't have a
> > requirement for the zone.
>
> "we" is google, I assume.
>
Yes.
> > Perhaps only define the gfp flag when we have
> > CONFIG_ZONE_DMA and break users' builds until they disable options that
> > require it
>
> That sounds a good idea.
>
> What happens in the current patch if someone passes __GFP_DMA when
> CONFIG_ZONE_DMA=n? ENOMEM? Perhaps it should WARN() as well.
>
It'll return NULL and I suggested adding a
#ifndef CONFIG_ZONE_DMA
if (WARN_ON_ONCE(gfp_mask & __GFP_DMA))
return NULL;
#endif
up front in the slowpath.
> hm. It'd be better to make all the drivers depend on ZONE_DMA. Good
> luck with that :)
>
If they all truly depended on it then we'd never have been able to disable
it. I think breaking the build when you have CONFIG_ZONE_DMA=n and
something is passing GFP_DMA would be the best alternative.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists