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 14:13:07 +0530 Message-ID: <1308040987.28682.52.camel@nikanth.blr.corp.google.com> References: <1307696223.28682.21.camel@nikanth.blr.corp.google.com> <62886fcb-651d-4529-98a1-58443dd83e9e@default> <4DF737EC0200007800046F1F@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4DF737EC0200007800046F1F@nat28.tlf.novell.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: Jan Beulich Cc: Dan Magenheimer , Jeremy Fitzhardinge , xen-devel@lists.xensource.com, Konrad Wilk List-Id: xen-devel@lists.xenproject.org On Tue, 2011-06-14 at 09:29 +0100, Jan Beulich wrote: > >>> On 13.06.11 at 16:58, 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 > You can specify the same object more than once, i.e. >=20 > obj-$(CONFIG_CLEAN_CACHE) +=3D tmem.o > obj-$(CONFIG_FRONTSWAP) +=3D tmem.o >=20 Cool! So, can this patch be merged then? It would be easy to patch for frontswap, in the frontswap patchset. Thanks Nikanth > Jan >=20 > >=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]=20 > >> Sent: Friday, June 10, 2011 2:57 AM > >> To: xen-devel@lists.xensource.com=20 > >> Cc: Jeremy Fitzhardinge; Konrad Rzeszutek Wilk > >> Subject: [Xen-devel] [PATCH] 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.52114098= 2 +0530 > >> +++ linux-2.6/drivers/xen/Makefile 2011-06-10 13:44:50.110986353 +05= 30 > >> @@ -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_o= id)); > >> 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=20 > >> http://lists.xensource.com/xen-devel=20 > >=20 > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com=20 > > http://lists.xensource.com/xen-devel=20 >=20 >=20