Nikanth Karthikesan
2011-Jun-10 08:57 UTC
[Xen-devel] [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled
xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled Fix compilation warning drivers/xen/tmem.c: In function ‘xen_tmem_init’: drivers/xen/tmem.c:246: warning: unused variable ‘old_ops’ drivers/xen/tmem.c: At top level: drivers/xen/tmem.c:234: warning: ‘tmem_cleancache_ops’ defined but not used Signed-off-by: Nikanth Karthikesan <nikanth@google.com> --- Index: linux-2.6/drivers/xen/Makefile ==================================================================--- 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 +0530 @@ -1,6 +1,6 @@ obj-y += grant-table.o features.o events.o manage.o balloon.o obj-y += xenbus/ -obj-y += tmem.o +obj-$(CONFIG_CLEAN_CACHE) += tmem.o nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_features.o := $(nostackp) Index: linux-2.6/drivers/xen/tmem.c ==================================================================--- 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 @@ if (!xen_domain()) return 0; -#ifdef CONFIG_CLEANCACHE BUG_ON(sizeof(struct cleancache_filekey) != sizeof(struct tmem_oid)); if (tmem_enabled && use_cleancache) { char *s = ""; @@ -257,7 +256,6 @@ printk(KERN_INFO "cleancache enabled, RAM provided by " "Xen Transcendent Memory%s\n", s); } -#endif return 0; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dan Magenheimer
2011-Jun-13 14:58 UTC
RE: [Xen-devel] [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled
> +obj-$(CONFIG_CLEAN_CACHE) += tmem.oHi 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 Transcendent Memory only if > Cleancache is enabled > > xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled > > Fix compilation warning > > drivers/xen/tmem.c: In function ‘xen_tmem_init’: > drivers/xen/tmem.c:246: warning: unused variable ‘old_ops’ > drivers/xen/tmem.c: At top level: > drivers/xen/tmem.c:234: warning: ‘tmem_cleancache_ops’ defined but not used > > Signed-off-by: Nikanth Karthikesan <nikanth@google.com> > > --- > > Index: linux-2.6/drivers/xen/Makefile > ==================================================================> --- 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 +0530 > @@ -1,6 +1,6 @@ > obj-y += grant-table.o features.o events.o manage.o balloon.o > obj-y += xenbus/ > -obj-y += tmem.o > +obj-$(CONFIG_CLEAN_CACHE) += tmem.o > > nostackp := $(call cc-option, -fno-stack-protector) > CFLAGS_features.o := $(nostackp) > Index: linux-2.6/drivers/xen/tmem.c > ==================================================================> --- 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 @@ > > if (!xen_domain()) > return 0; > -#ifdef CONFIG_CLEANCACHE > BUG_ON(sizeof(struct cleancache_filekey) != sizeof(struct tmem_oid)); > if (tmem_enabled && use_cleancache) { > char *s = ""; > @@ -257,7 +256,6 @@ > printk(KERN_INFO "cleancache enabled, RAM provided by " > "Xen Transcendent Memory%s\n", s); > } > -#endif > return 0; > } > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Nikanth Karthikesan
2011-Jun-14 06:02 UTC
RE: [Xen-devel] [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled
On Mon, 2011-06-13 at 07:58 -0700, Dan Magenheimer wrote:> > +obj-$(CONFIG_CLEAN_CACHE) += 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) >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> 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 Transcendent Memory only if > > Cleancache is enabled > > > > xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled > > > > Fix compilation warning > > > > drivers/xen/tmem.c: In function ‘xen_tmem_init’: > > drivers/xen/tmem.c:246: warning: unused variable ‘old_ops’ > > drivers/xen/tmem.c: At top level: > > drivers/xen/tmem.c:234: warning: ‘tmem_cleancache_ops’ defined but not used > > > > Signed-off-by: Nikanth Karthikesan <nikanth@google.com> > > > > --- > > > > Index: linux-2.6/drivers/xen/Makefile > > ==================================================================> > --- 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 +0530 > > @@ -1,6 +1,6 @@ > > obj-y += grant-table.o features.o events.o manage.o balloon.o > > obj-y += xenbus/ > > -obj-y += tmem.o > > +obj-$(CONFIG_CLEAN_CACHE) += tmem.o > > > > nostackp := $(call cc-option, -fno-stack-protector) > > CFLAGS_features.o := $(nostackp) > > Index: linux-2.6/drivers/xen/tmem.c > > ==================================================================> > --- 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 @@ > > > > if (!xen_domain()) > > return 0; > > -#ifdef CONFIG_CLEANCACHE > > BUG_ON(sizeof(struct cleancache_filekey) != sizeof(struct tmem_oid)); > > if (tmem_enabled && use_cleancache) { > > char *s = ""; > > @@ -257,7 +256,6 @@ > > printk(KERN_INFO "cleancache enabled, RAM provided by " > > "Xen Transcendent Memory%s\n", s); > > } > > -#endif > > return 0; > > } > > > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-Jun-14 08:29 UTC
RE: [Xen-devel] [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled
>>> On 13.06.11 at 16:58, Dan Magenheimer <dan.magenheimer@oracle.com> wrote: >> +obj-$(CONFIG_CLEAN_CACHE) += 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)You can specify the same object more than once, i.e. obj-$(CONFIG_CLEAN_CACHE) += tmem.o obj-$(CONFIG_FRONTSWAP) += tmem.o Jan> > 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 > Transcendent Memory only if >> Cleancache is enabled >> >> xen-tmem: Build cleancache shim to Xen Transcendent Memory only if > Cleancache is enabled >> >> Fix compilation warning >> >> drivers/xen/tmem.c: In function ‘xen_tmem_init’: >> drivers/xen/tmem.c:246: warning: unused variable ‘old_ops’ >> drivers/xen/tmem.c: At top level: >> drivers/xen/tmem.c:234: warning: ‘tmem_cleancache_ops’ defined but not used >> >> Signed-off-by: Nikanth Karthikesan <nikanth@google.com> >> >> --- >> >> Index: linux-2.6/drivers/xen/Makefile >> ==================================================================>> --- 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 +0530 >> @@ -1,6 +1,6 @@ >> obj-y += grant-table.o features.o events.o manage.o balloon.o >> obj-y += xenbus/ >> -obj-y += tmem.o >> +obj-$(CONFIG_CLEAN_CACHE) += tmem.o >> >> nostackp := $(call cc-option, -fno-stack-protector) >> CFLAGS_features.o := $(nostackp) >> Index: linux-2.6/drivers/xen/tmem.c >> ==================================================================>> --- 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 @@ >> >> if (!xen_domain()) >> return 0; >> -#ifdef CONFIG_CLEANCACHE >> BUG_ON(sizeof(struct cleancache_filekey) != sizeof(struct tmem_oid)); >> if (tmem_enabled && use_cleancache) { >> char *s = ""; >> @@ -257,7 +256,6 @@ >> printk(KERN_INFO "cleancache enabled, RAM provided by " >> "Xen Transcendent Memory%s\n", s); >> } >> -#endif >> return 0; >> } >> >> >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Nikanth Karthikesan
2011-Jun-14 08:43 UTC
RE: [Xen-devel] [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled
On Tue, 2011-06-14 at 09:29 +0100, Jan Beulich wrote:> >>> On 13.06.11 at 16:58, Dan Magenheimer <dan.magenheimer@oracle.com> wrote: > >> +obj-$(CONFIG_CLEAN_CACHE) += 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) > > You can specify the same object more than once, i.e. > > obj-$(CONFIG_CLEAN_CACHE) += tmem.o > obj-$(CONFIG_FRONTSWAP) += tmem.o >Cool! So, can this patch be merged then? It would be easy to patch for frontswap, in the frontswap patchset. Thanks Nikanth> Jan > > > > > 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 > > Transcendent Memory only if > >> Cleancache is enabled > >> > >> xen-tmem: Build cleancache shim to Xen Transcendent Memory only if > > Cleancache is enabled > >> > >> Fix compilation warning > >> > >> drivers/xen/tmem.c: In function ‘xen_tmem_init’: > >> drivers/xen/tmem.c:246: warning: unused variable ‘old_ops’ > >> drivers/xen/tmem.c: At top level: > >> drivers/xen/tmem.c:234: warning: ‘tmem_cleancache_ops’ defined but not used > >> > >> Signed-off-by: Nikanth Karthikesan <nikanth@google.com> > >> > >> --- > >> > >> Index: linux-2.6/drivers/xen/Makefile > >> ==================================================================> >> --- 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 +0530 > >> @@ -1,6 +1,6 @@ > >> obj-y += grant-table.o features.o events.o manage.o balloon.o > >> obj-y += xenbus/ > >> -obj-y += tmem.o > >> +obj-$(CONFIG_CLEAN_CACHE) += tmem.o > >> > >> nostackp := $(call cc-option, -fno-stack-protector) > >> CFLAGS_features.o := $(nostackp) > >> Index: linux-2.6/drivers/xen/tmem.c > >> ==================================================================> >> --- 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 @@ > >> > >> if (!xen_domain()) > >> return 0; > >> -#ifdef CONFIG_CLEANCACHE > >> BUG_ON(sizeof(struct cleancache_filekey) != sizeof(struct tmem_oid)); > >> if (tmem_enabled && use_cleancache) { > >> char *s = ""; > >> @@ -257,7 +256,6 @@ > >> printk(KERN_INFO "cleancache enabled, RAM provided by " > >> "Xen Transcendent Memory%s\n", s); > >> } > >> -#endif > >> return 0; > >> } > >> > >> > >> > >> > >> _______________________________________________ > >> Xen-devel mailing list > >> Xen-devel@lists.xensource.com > >> http://lists.xensource.com/xen-devel > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dan Magenheimer
2011-Jun-14 16:09 UTC
RE: [Xen-devel] [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled
> From: Nikanth Karthikesan [mailto:nikanth@google.com] > Sent: Tuesday, June 14, 2011 2:43 AM > To: Jan Beulich > Cc: Dan Magenheimer; Jeremy Fitzhardinge; xen-devel@lists.xensource.com; Konrad Wilk > Subject: RE: [Xen-devel] [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if > Cleancache is enabled > > On Tue, 2011-06-14 at 09:29 +0100, Jan Beulich wrote: > > >>> On 13.06.11 at 16:58, Dan Magenheimer <dan.magenheimer@oracle.com> wrote: > > >> +obj-$(CONFIG_CLEAN_CACHE) += 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) > > > > You can specify the same object more than once, i.e. > > > > obj-$(CONFIG_CLEAN_CACHE) += tmem.o > > obj-$(CONFIG_FRONTSWAP) += tmem.o > > > > Cool! > > So, can this patch be merged then? It would be easy to patch for > frontswap, in the frontswap patchset.I''m OK with the Makefile change, but the second part of your patch that removes the #ifdef CONFIG_CLEANCACHE will just need to be put in again when frontswap is added (as it will be possible that CONFIG_FRONTSWAP=y but CONFIG_CLEANCACHE=n). Is there a rush on this (i.e. is the compiler warning impeding your work somehow)? As I said, it should all be cleaned up soon so would prefer not to submit these piecemeal. Thanks, Dan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel