aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/tmem.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-01-08 11:25:22 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-01-08 11:25:22 +0000
commitc7aa3385842a6f48bf7156c07978fca3728a8ba3 (patch)
treeff16df4cfab25bf260be321ef29e20b7d8e036c3 /xen/common/tmem.c
parent925a248ade6f810aa9534ebf9864bc7ebcc8f0b5 (diff)
downloadxen-c7aa3385842a6f48bf7156c07978fca3728a8ba3.tar.gz
xen-c7aa3385842a6f48bf7156c07978fca3728a8ba3.tar.bz2
xen-c7aa3385842a6f48bf7156c07978fca3728a8ba3.zip
tmem: Reduce verbosity on failed memory allocations.
Reduce tmem complaints per Jan's concerns in this thread http://lists.xensource.com/archives/html/xen-devel/2010-01/msg00155.html Now complains only if tmem HAS memory to relinquish and memory request has order>0. Signed-off by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'xen/common/tmem.c')
-rw-r--r--xen/common/tmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index ab1b3cd8f6..eed3192efb 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2177,7 +2177,7 @@ static NOINLINE int do_tmem_control(struct tmem_op *op)
ret = tmemc_set_var(op->u.ctrl.cli_id,subop,op->u.ctrl.arg1);
break;
case TMEMC_QUERY_FREEABLE_MB:
- ret = tmh_freeable_mb();
+ ret = tmh_freeable_pages() >> (20 - PAGE_SHIFT);
break;
case TMEMC_SAVE_BEGIN:
case TMEMC_RESTORE_BEGIN:
@@ -2474,7 +2474,7 @@ EXPORT void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
unsigned long evicts_per_relinq = 0;
int max_evictions = 10;
- if (!tmh_enabled())
+ if (!tmh_enabled() || !tmh_freeable_pages())
return NULL;
#ifdef __i386__
return NULL;