On Tue, Jan 22, 2013 at 02:40:24PM -0800, Andrew Morton wrote:
> On Tue, 22 Jan 2013 17:12:39 +0000
> Mel Gorman <mgor...@suse.de> wrote:
> 
> > The current definitions for count_vm_numa_events() is wrong for
> > !CONFIG_NUMA_BALANCING as the following would miss the side-effect.
> > 
> >     count_vm_numa_events(NUMA_FOO, bar++);
> 
> Stupid macros.
> 

I know but static inlines are unsuitable in this case.

> > There are no such users of count_vm_numa_events() but it is a potential
> > pitfall. This patch fixes it and converts count_vm_numa_event() so that
> > the definitions look similar.
> 
> Confused.  The patch doesn't alter count_vm_numa_event().  No matter.
> 

Nuts. When I wrote that line in the changelog, it
was because I had converted both to a static inline but that fails to
compile if !CONFIG_NUMA_BALANCING because NUMA_PTE_UPDATES is not
defined.

===
There are no such users of count_vm_numa_events() but this patch fixes it as
it is a potential pitfall. Ideally both would be converted to static inline
but NUMA_PTE_UPDATES is not defined if !CONFIG_NUMA_BALANCING and creating
dummy constants just to have a static inline would be similarly clumsy.
====

-- 
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to