xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xenproject.org, konrad@kernel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH v1 04/12] tmem: Wrap tmem tze code with CONFIG_TMEM_TZE
Date: Wed, 28 Sep 2016 05:42:18 -0400	[thread overview]
Message-ID: <1475055746-22401-5-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1475055746-22401-1-git-send-email-konrad.wilk@oracle.com>

. which is actually dependent on CONFIG_TMEM_DEDUP

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
v1: First submission.
---
 xen/common/tmem.c          | 12 ++++++++++--
 xen/common/tmem_xen.c      |  4 ++++
 xen/include/xen/tmem_xen.h |  4 ++++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 8327218..b673120 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -96,7 +96,9 @@ struct tmem_page_content_descriptor {
     union {
         struct page_info *pfp;  /* Page frame pointer. */
         char *cdata; /* If compression_enabled. */
+#ifdef CONFIG_TMEM_TZE
         char *tze; /* If !compression_enabled, trailing zeroes eliminated. */
+#endif
     };
 #ifdef CONFIG_TMEM_DEDUP
     struct list_head pgp_list;
@@ -2424,8 +2426,14 @@ static int __init init_tmem(void)
 #else
                0,
 #endif
-               tmem_tze_enabled());
-#ifdef CONFIG_TMEM_DEDUP
+#ifdef CONFIG_TMEM_TZE
+               tmem_tze_enabled()
+#else
+               0
+#endif
+            );
+
+#if defined(CONFIG_TMEM_DEDUP) && defined(CONFIG_TMEM_TZE)
         if ( tmem_dedup_enabled()&&tmem_compression_enabled()&&tmem_tze_enabled() )
         {
             tmem_tze_disable();
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index 9a2bfed..d42deef 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -25,8 +25,10 @@ bool_t __read_mostly opt_tmem_dedup = 0;
 boolean_param("tmem_dedup", opt_tmem_dedup);
 #endif
 
+#ifdef CONFIG_TMEM_TZE
 bool_t __read_mostly opt_tmem_tze = 0;
 boolean_param("tmem_tze", opt_tmem_tze);
+#endif
 
 bool_t __read_mostly opt_tmem_shared_auth = 0;
 boolean_param("tmem_shared_auth", opt_tmem_shared_auth);
@@ -218,6 +220,7 @@ int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
     return 1;
 }
 
+#ifdef CONFIG_TMEM_TZE
 int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
                                     pagesize_t len)
 {
@@ -239,6 +242,7 @@ int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
     smp_mb();
     return 1;
 }
+#endif
 
 /******************  XEN-SPECIFIC HOST INITIALIZATION ********************/
 static int dstmem_order, workmem_order;
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index 52f87b1..3be8001 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -49,6 +49,7 @@ static inline bool_t tmem_dedup_enabled(void)
 }
 #endif
 
+#ifdef CONFIG_TMEM_TZE
 extern bool_t opt_tmem_tze;
 static inline bool_t tmem_tze_enabled(void)
 {
@@ -59,6 +60,7 @@ static inline void tmem_tze_disable(void)
 {
     opt_tmem_tze = 0;
 }
+#endif
 
 extern bool_t opt_tmem_shared_auth;
 static inline bool_t tmem_shared_auth(void)
@@ -340,7 +342,9 @@ int tmem_compress_from_client(xen_pfn_t, void **, size_t *,
 
 int tmem_copy_from_client(struct page_info *, xen_pfn_t, tmem_cli_va_param_t);
 int tmem_copy_to_client(xen_pfn_t, struct page_info *, tmem_cli_va_param_t);
+#ifdef CONFIG_TMEM_TZE
 extern int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va, pagesize_t len);
+#endif
 
 #define tmem_client_err(fmt, args...)  printk(XENLOG_G_ERR fmt, ##args)
 #define tmem_client_warn(fmt, args...) printk(XENLOG_G_WARNING fmt, ##args)
-- 
2.4.11


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-09-28  9:42 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  9:42 [PATCH v1] Tmem cleanups/improvements for v4.8 Konrad Rzeszutek Wilk
2016-09-28  9:42 ` [PATCH v1 01/12] libxc/tmem/restore: Remove call to XEN_SYSCTL_TMEM_OP_SAVE_GET_VERSION Konrad Rzeszutek Wilk
2016-09-28 11:00   ` Wei Liu
2016-09-28  9:42 ` [PATCH v1 02/12] tmem: Retire XEN_SYSCTL_TMEM_OP_[SET_CAP|SAVE_GET_CLIENT_CAP] Konrad Rzeszutek Wilk
2016-09-28 11:00   ` Wei Liu
2016-09-28 15:03     ` Konrad Rzeszutek Wilk
2016-09-28 12:10   ` Jan Beulich
2016-09-30 14:04     ` Konrad Rzeszutek Wilk
2016-09-28  9:42 ` [PATCH v1 03/12] tmem: Wrap tmem dedup code with CONFIG_TMEM_DEDUP Konrad Rzeszutek Wilk
2016-09-28 12:18   ` Jan Beulich
2016-09-28  9:42 ` Konrad Rzeszutek Wilk [this message]
2016-09-28 12:19   ` [PATCH v1 04/12] tmem: Wrap tmem tze code with CONFIG_TMEM_TZE Jan Beulich
2016-09-28  9:42 ` [PATCH v1 05/12] tmem: Delete deduplication (and tze) code Konrad Rzeszutek Wilk
2016-09-28 12:34   ` Jan Beulich
2016-09-28 15:05     ` Konrad Rzeszutek Wilk
2016-09-28  9:42 ` [PATCH v1 06/12] tmem: Move client weight, frozen, live_migrating, and compress Konrad Rzeszutek Wilk
2016-09-28 12:39   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 07/12] tmem/libxc: Squash XEN_SYSCTL_TMEM_OP_[SET|SAVE] Konrad Rzeszutek Wilk
2016-09-28 11:06   ` Wei Liu
2016-09-28 12:50   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 08/12] tmem: Handle 'struct tmem_info' as a seperate field in the Konrad Rzeszutek Wilk
2016-09-28 11:00   ` Wei Liu
2016-09-28 12:56   ` Jan Beulich
2016-09-30 14:36     ` Konrad Rzeszutek Wilk
2016-09-30 14:56       ` Jan Beulich
2016-09-30 16:51         ` Konrad Rzeszutek Wilk
2016-09-28  9:42 ` [PATCH v1 09/12] tmem: Check version and maxpools when XEN_SYSCTL_TMEM_SET_CLIENT_INFO Konrad Rzeszutek Wilk
2016-09-28 11:00   ` Wei Liu
2016-09-28 12:58   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 10/12] tmem: Unify XEN_SYSCTL_TMEM_OP_[[SAVE_[BEGIN|END]|RESTORE_BEGIN] Konrad Rzeszutek Wilk
2016-09-28 11:06   ` Wei Liu
2016-09-28 13:00   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 11/12] tmem/xc_tmem_control: Rename 'arg1' to 'len' and 'arg2' to arg Konrad Rzeszutek Wilk
2016-09-28 11:07   ` Wei Liu
2016-09-28  9:42 ` [PATCH v1 12/12] tmem: Batch and squash XEN_SYSCTL_TMEM_OP_SAVE_GET_POOL_[FLAGS, NPAGES, UUID] in one sub-call: XEN_SYSCTL_TMEM_OP_GET_POOLS Konrad Rzeszutek Wilk
2016-09-28 11:07   ` Wei Liu
2016-09-28 13:11   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475055746-22401-5-git-send-email-konrad.wilk@oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=konrad@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).