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 <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2013-12-03 16:32:52 +01:00
parent 26b336f811
commit aee0dcb1ec
2 changed files with 4 additions and 4 deletions

View File

@ -1127,7 +1127,6 @@ static void fork_helper_exit_handler(int sig)
bool __igt_fork_helper(struct igt_helper_process *proc) bool __igt_fork_helper(struct igt_helper_process *proc)
{ {
pid_t pid; pid_t pid;
sighandler_t oldsig;
int id; int id;
assert(!proc->running); 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 * that inserting sufficient amounts of printf or other delays makes
* this unnecessary. * this unnecessary.
*/ */
oldsig = signal(SIGQUIT, SIG_DFL);
switch (pid = fork()) { switch (pid = fork()) {
case -1: case -1:
igt_assert(0); igt_assert(0);
@ -1155,8 +1153,6 @@ bool __igt_fork_helper(struct igt_helper_process *proc)
return true; return true;
default: default:
signal(SIGQUIT, oldsig);
proc->running = true; proc->running = true;
proc->pid = pid; proc->pid = pid;
proc->id = id; proc->id = id;

View File

@ -366,6 +366,10 @@ igt_main
max = gem_aperture_size (fd) / (1024 * 1024) / 2; max = gem_aperture_size (fd) / (1024 * 1024) / 2;
if (num_buffers > max) if (num_buffers > max)
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++) for (i = 0; i < ARRAY_SIZE(access_modes); i++)