Re: [BUGFIX][PATCH] memcg: avoid use cmpxchg in swap cgroupmaintainance (Was Re: 34-rc1-git3 build failure withCGROUP_MEM_RES_CTLR_SWAP=y

From: Balbir Singh
Date: Sun Mar 14 2010 - 22:14:43 EST


* KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> [2010-03-15 10:02:02]:

> On Sun, 14 Mar 2010 16:18:06 +0530
> Sachin Sant <sachinp@xxxxxxxxxx> wrote:
>
> > On a PowerPC box, latest 34-rc1 git(d89b218b8...) fails to build
> > with CGROUPS_MEM_RES_CTRL_SWAP=y.
> >
> > LD init/built-in.o
> > LD .tmp_vmlinux1
> > mm/built-in.o: In function __xchg:
> > arch/powerpc/include/asm/system.h:331: undefined reference to .__xchg_called_with_bad_pointer
> > mm/built-in.o: In function __cmpxchg:
> > arch/powerpc/include/asm/system.h:474: undefined reference to .__cmpxchg_called_with_bad_pointer
> > make: *** [.tmp_vmlinux1] Error 1
> >
> > The code in question was added via commit 024914477e...
> >
> > memcg: move charges of anonymous swap
> >
> Oh..ok, powerpc (and other archs?) can't do 2byte cmpxchg and xchg.
> Then, we should use spinlock rather than that.
>
> How about this ? Nishimura-san, could you consider something better ?
> We need a quick fix.
>

Looks good to me


Acked-by: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx>


--
Three Cheers,
Balbir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/