Factor in kernel object overhead when checking available memory for tests

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2014-05-28 09:01:56 +01:00
parent e4ba3b75e6
commit 321273ff76
5 changed files with 49 additions and 17 deletions
+2 -2
View File
@@ -150,6 +150,7 @@ static void test_forking_evictions(int fd, int size, int count,
int trash_count;
trash_count = intel_get_total_ram_mb() * 11 / 10;
igt_require(intel_check_memory(trash_count, size, CHECK_RAM | CHECK_SWAP));
forking_evictions(fd, &fault_ops, size, count, trash_count, flags);
}
@@ -158,9 +159,8 @@ static void test_swapping_evictions(int fd, int size, int count)
{
int trash_count;
igt_require(intel_get_total_ram_mb() / 4 < intel_get_total_swap_mb());
trash_count = intel_get_total_ram_mb() * 11 / 10;
igt_require(intel_check_memory(trash_count, size, CHECK_RAM | CHECK_SWAP));
swapping_evictions(fd, &fault_ops, size, count, trash_count);
}