diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-08-10 13:27:54 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-08-10 13:27:54 +0100 |
commit | 81d70f1a53806178596e48a8f81f870a5f9c74e0 (patch) | |
tree | 52943c0142ba3cb9eafc2362a6d9aaf3a1adb0c1 /xen/common/tmem_xen.c | |
parent | 37541c41651ee9b29ffeda3870cb3ba704d7e756 (diff) | |
download | xen-81d70f1a53806178596e48a8f81f870a5f9c74e0.tar.gz xen-81d70f1a53806178596e48a8f81f870a5f9c74e0.tar.bz2 xen-81d70f1a53806178596e48a8f81f870a5f9c74e0.zip |
tmem: expose freeable memory
Expose tmem "freeable" memory for use by management tools.
Management tools looking for a machine with available
memory often look at free_memory to determine if there
is enough physical memory to house a new or migrating
guest. Since tmem absorbs much or all free memory,
and since "ephemeral" tmem memory can be synchronously
freed, management tools need more data -- not only how
much memory is "free" but also how much memory is
"freeable" by tmem if tmem is told (via an already
existing tmem hypercall) to relinquish freeable memory.
This patch provides that extra piece of data (in MB).
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'xen/common/tmem_xen.c')
-rw-r--r-- | xen/common/tmem_xen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c index d273ab7cbe..c11aa60d6e 100644 --- a/xen/common/tmem_xen.c +++ b/xen/common/tmem_xen.c @@ -26,6 +26,8 @@ boolean_param("tmem_shared_auth", opt_tmem_shared_auth); EXPORT int opt_tmem_lock = 0; integer_param("tmem_lock", opt_tmem_lock); +EXPORT atomic_t freeable_page_count = ATOMIC_INIT(0); + #ifdef COMPARE_COPY_PAGE_SSE2 DECL_CYC_COUNTER(pg_copy1); DECL_CYC_COUNTER(pg_copy2); |