From: "Jan Beulich" Subject: RE: [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled Date: Tue, 14 Jun 2011 09:29:00 +0100 Message-ID: <4DF737EC0200007800046F1F@nat28.tlf.novell.com> References: <1307696223.28682.21.camel@nikanth.blr.corp.google.com> <62886fcb-651d-4529-98a1-58443dd83e9e@default> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <62886fcb-651d-4529-98a1-58443dd83e9e@default> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Nikanth Karthikesan , Dan Magenheimer Cc: Jeremy Fitzhardinge , xen-devel@lists.xensource.com, Konrad Wilk List-Id: xen-devel@lists.xenproject.org >>> On 13.06.11 at 16:58, Dan Magenheimer = wrote: >> +obj-=24(CONFIG_CLEAN_CACHE) +=3D tmem.o >=20 > Hi Nikanth -- >=20 > Thanks for the suggested patch. However, tmem.c works with both > cleancache and frontswap... the shim in place only works with > cleancache but there is a posted patch for it to work with > frontswap as well. So your patch would just need to be > redone when frontswap is included soon. >=20 > BUT... is there a way to do an inclusive-or operation > in a Makefile?... something like this (though I know this > exact syntax won=27t work)... >=20 > obj-(=24CONFIG_CLEANCACHE=7C=7C=24CONFIG_FRONTSWAP) You can specify the same object more than once, i.e. obj-=24(CONFIG_CLEAN_CACHE) +=3D tmem.o obj-=24(CONFIG_FRONTSWAP) +=3D tmem.o Jan >=20 > Thanks, > Dan >=20 > Thanks... for the memory=21 > I really could use more / my throughput=27s on the floor > The balloon is flat / my swap disk=27s fat / I=27ve OOM=27s in store > Overcommitted so much > (with apologies to Bob Hope) >=20 >> -----Original Message----- >> From: Nikanth Karthikesan =5Bmailto:nikanth=40google.com=5D=20 >> Sent: Friday, June 10, 2011 2:57 AM >> To: xen-devel=40lists.xensource.com=20 >> Cc: Jeremy Fitzhardinge; Konrad Rzeszutek Wilk >> Subject: =5BXen-devel=5D =5BPATCH=5D xen-tmem: Build cleancache shim to = Xen=20 > Transcendent Memory only if >> Cleancache is enabled >>=20 >> xen-tmem: Build cleancache shim to Xen Transcendent Memory only if=20 > Cleancache is enabled >>=20 >> Fix compilation warning >>=20 >> drivers/xen/tmem.c: In function =E2=80=98xen_tmem_init=E2=80=99: >> drivers/xen/tmem.c:246: warning: unused variable =E2=80=98old_ops=E2=80= =99 >> drivers/xen/tmem.c: At top level: >> drivers/xen/tmem.c:234: warning: =E2=80=98tmem_cleancache_ops=E2=80=99 = defined but not used >>=20 >> Signed-off-by: Nikanth Karthikesan >>=20 >> --- >>=20 >> Index: linux-2.6/drivers/xen/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- linux-2.6.orig/drivers/xen/Makefile 2011-06-10 13:42:18.5211409= 82 +0530 >> +++ linux-2.6/drivers/xen/Makefile 2011-06-10 13:44:50.110986353 = +0530 >> =40=40 -1,6 +1,6 =40=40 >> obj-y +=3D grant-table.o features.o events.o manage.o balloon.o >> obj-y +=3D xenbus/ >> -obj-y +=3D tmem.o >> +obj-=24(CONFIG_CLEAN_CACHE) +=3D tmem.o >>=20 >> nostackp :=3D =24(call cc-option, -fno-stack-protector) >> CFLAGS_features.o :=3D =24(nostackp) >> Index: linux-2.6/drivers/xen/tmem.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- linux-2.6.orig/drivers/xen/tmem.c 2011-06-10 12:19:14.5223918= 90 +0530 >> +++ linux-2.6/drivers/xen/tmem.c 2011-06-10 13:45:42.500984200 = +0530 >> =40=40 -247,7 +247,6 =40=40 >>=20 >> if (=21xen_domain()) >> return 0; >> -=23ifdef CONFIG_CLEANCACHE >> BUG_ON(sizeof(struct cleancache_filekey) =21=3D sizeof(struct = tmem_oid)); >> if (tmem_enabled && use_cleancache) =7B >> char *s =3D =22=22; >> =40=40 -257,7 +256,6 =40=40 >> printk(KERN_INFO =22cleancache enabled, RAM provided by = =22 >> =22Xen Transcendent Memory%s=5Cn=22, s); >> =7D >> -=23endif >> return 0; >> =7D >>=20 >>=20 >>=20 >>=20 >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel=40lists.xensource.com=20 >> http://lists.xensource.com/xen-devel=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel=40lists.xensource.com=20 > http://lists.xensource.com/xen-devel=20