From: Dan Magenheimer Subject: RE: [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled Date: Mon, 13 Jun 2011 07:58:37 -0700 (PDT) Message-ID: <62886fcb-651d-4529-98a1-58443dd83e9e@default> References: <1307696223.28682.21.camel@nikanth.blr.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1307696223.28682.21.camel@nikanth.blr.corp.google.com> 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 , xen-devel@lists.xensource.com Cc: Jeremy Fitzhardinge , Konrad Wilk List-Id: xen-devel@lists.xenproject.org > +obj-$(CONFIG_CLEAN_CACHE)=09+=3D tmem.o Hi Nikanth -- 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. BUT... is there a way to do an inclusive-or operation in a Makefile?... something like this (though I know this exact syntax won't work)... obj-($CONFIG_CLEANCACHE||$CONFIG_FRONTSWAP) Thanks, Dan Thanks... for the memory! I really could use more / my throughput's on the floor The balloon is flat / my swap disk's fat / I've OOM's in store Overcommitted so much (with apologies to Bob Hope) > -----Original Message----- > From: Nikanth Karthikesan [mailto:nikanth@google.com] > Sent: Friday, June 10, 2011 2:57 AM > To: xen-devel@lists.xensource.com > Cc: Jeremy Fitzhardinge; Konrad Rzeszutek Wilk > Subject: [Xen-devel] [PATCH] xen-tmem: Build cleancache shim to Xen Trans= cendent Memory only if > Cleancache is enabled >=20 > xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleanc= ache 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 de= fined 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=092011-06-10 13:42:18.521140982 += 0530 > +++ linux-2.6/drivers/xen/Makefile=092011-06-10 13:44:50.110986353 +0530 > @@ -1,6 +1,6 @@ > obj-y=09+=3D grant-table.o features.o events.o manage.o balloon.o > obj-y=09+=3D xenbus/ > -obj-y=09+=3D tmem.o > +obj-$(CONFIG_CLEAN_CACHE)=09+=3D tmem.o >=20 > nostackp :=3D $(call cc-option, -fno-stack-protector) > CFLAGS_features.o=09=09=09:=3D $(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=092011-06-10 12:19:14.522391890 +05= 30 > +++ linux-2.6/drivers/xen/tmem.c=092011-06-10 13:45:42.500984200 +0530 > @@ -247,7 +247,6 @@ >=20 > =09if (!xen_domain()) > =09=09return 0; > -#ifdef CONFIG_CLEANCACHE > =09BUG_ON(sizeof(struct cleancache_filekey) !=3D sizeof(struct tmem_oid)= ); > =09if (tmem_enabled && use_cleancache) { > =09=09char *s =3D ""; > @@ -257,7 +256,6 @@ > =09=09printk(KERN_INFO "cleancache enabled, RAM provided by " > =09=09=09=09 "Xen Transcendent Memory%s\n", s); > =09} > -#endif > =09return 0; > } >=20 >=20 >=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel