From aee0dcb1ec2075991d310dd6f3fb5e50160847d1 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 3 Dec 2013 16:32:52 +0100 Subject: [PATCH] test/gem_concurrent_blt Limit working set size also with available ram. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255 Signed-off-by: Daniel Vetter --- lib/drmtest.c | 4 ---- tests/gem_concurrent_blit.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index 94fa686..eeab5e6 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -1127,7 +1127,6 @@ static void fork_helper_exit_handler(int sig) bool __igt_fork_helper(struct igt_helper_process *proc) { pid_t pid; - sighandler_t oldsig; int id; assert(!proc->running); @@ -1144,7 +1143,6 @@ bool __igt_fork_helper(struct igt_helper_process *proc) * that inserting sufficient amounts of printf or other delays makes * this unnecessary. */ - oldsig = signal(SIGQUIT, SIG_DFL); switch (pid = fork()) { case -1: igt_assert(0); @@ -1155,8 +1153,6 @@ bool __igt_fork_helper(struct igt_helper_process *proc) return true; default: - signal(SIGQUIT, oldsig); - proc->running = true; proc->pid = pid; proc->id = id; diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent_blit.c index fb56c25..27bc795 100644 --- a/tests/gem_concurrent_blit.c +++ b/tests/gem_concurrent_blit.c @@ -366,6 +366,10 @@ igt_main max = gem_aperture_size (fd) / (1024 * 1024) / 2; if (num_buffers > max) num_buffers = max; + + max = intel_get_total_ram_mb() * 3 / 4; + if (num_buffers > max) + num_buffers = max; } for (i = 0; i < ARRAY_SIZE(access_modes); i++) -- 2.7.4