From: Nikanth Karthikesan Subject: RE: [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled Date: Tue, 14 Jun 2011 11:32:58 +0530 Message-ID: <1308031378.28682.42.camel@nikanth.blr.corp.google.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> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: xen-devel@lists.xensource.com, Jeremy Fitzhardinge , Konrad Wilk List-Id: xen-devel@lists.xenproject.org On Mon, 2011-06-13 at 07:58 -0700, Dan Magenheimer wrote: > > +obj-$(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't work)... >=20 > obj-($CONFIG_CLEANCACHE||$CONFIG_FRONTSWAP) >=20 I think, we need to introduce a new kconfig option config XEN_TMEM bool depends on CLEANCACHE || FRONTSWAP and use obj-($CONFIG_XEN_TMEM) Thanks Nikanth =20 > Thanks, > Dan >=20 > 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) >=20 > > -----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 T= ranscendent Memory only if > > Cleancache is enabled > >=20 > > xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cl= eancache 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.521140982= +0530 > > +++ linux-2.6/drivers/xen/Makefile 2011-06-10 13:44:50.110986353 +053= 0 > > @@ -1,6 +1,6 @@ > > obj-y +=3D grant-table.o features.o events.o manage.o balloon.o > > obj-y +=3D xenbus/ > > -obj-y +=3D tmem.o > > +obj-$(CONFIG_CLEAN_CACHE) +=3D tmem.o > >=20 > > nostackp :=3D $(call cc-option, -fno-stack-protector) > > CFLAGS_features.o :=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 2011-06-10 12:19:14.522391890 += 0530 > > +++ linux-2.6/drivers/xen/tmem.c 2011-06-10 13:45:42.500984200 +0530 > > @@ -247,7 +247,6 @@ > >=20 > > if (!xen_domain()) > > return 0; > > -#ifdef CONFIG_CLEANCACHE > > BUG_ON(sizeof(struct cleancache_filekey) !=3D sizeof(struct tmem_oi= d)); > > if (tmem_enabled && use_cleancache) { > > char *s =3D ""; > > @@ -257,7 +256,6 @@ > > printk(KERN_INFO "cleancache enabled, RAM provided by " > > "Xen Transcendent Memory%s\n", s); > > } > > -#endif > > return 0; > > } > >=20 > >=20 > >=20 > >=20 > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel