projects
/
profile
/
extras
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37773d9
)
lib: Test against available swap
author
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 26 Feb 2014 11:56:16 +0000
(11:56 +0000)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 26 Feb 2014 12:06:10 +0000
(12:06 +0000)
Even if we ignore the double-accounting bug in Linux, we need to be sure
that the remaining swapspace is adequate for running our test as the
system may be under load before we even start.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
lib/intel_drm.c
patch
|
blob
|
history
diff --git
a/lib/intel_drm.c
b/lib/intel_drm.c
index
cde068b
..
f16e578
100644
(file)
--- a/
lib/intel_drm.c
+++ b/
lib/intel_drm.c
@@
-132,7
+132,7
@@
intel_get_total_swap_mb(void)
ret = sysinfo(&sysinf);
assert(ret == 0);
- retval = sysinf.
total
swap;
+ retval = sysinf.
free
swap;
retval *= sysinf.mem_unit;
#elif defined(HAVE_SWAPCTL) /* Solaris */
long pagesize = sysconf(_SC_PAGESIZE);