From mboxrd@z Thu Jan 1 00:00:00 1970 From: oscar.mateo@intel.com Subject: [PATCH v2 2/3] tests/gem_close_race: Adapt the test for Full PPGTT Date: Fri, 13 Dec 2013 16:24:37 +0000 Message-ID: <1386951877-13778-1-git-send-email-oscar.mateo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 01FE8FBA95 for ; Fri, 13 Dec 2013 08:32:42 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Oscar Mateo With Full PPGTT, each new fd creates a new context and thus a new PPGTT, so we have to reduce the number of simultaneous fds or face OOM problems. For every new PPGTT, its PDEs are stored in the GGTT which imposes a limit of 1024 new contexts. We want to leave at least 1/4 of the GGTT available for "important" stuff like scanout buffers, so never open more than 768 fds. v2: Unconditionally use the lower limit, as suggested by Daniel Vetter Signed-off-by: Oscar Mateo --- tests/gem_close_race.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c index 6064c02..3a2d847 100644 --- a/tests/gem_close_race.c +++ b/tests/gem_close_race.c @@ -136,7 +136,7 @@ static void run(int child) gem_read(fd, handle, 0, &handle, sizeof(handle)); } -#define NUM_FD 32000 +#define NUM_FD 768 struct thread { pthread_mutex_t mutex; @@ -222,7 +222,7 @@ igt_main } igt_subtest("process-exit") { - igt_fork(child, 2000) + igt_fork(child, NUM_FD) run(child); igt_waitchildren(); } -- 1.7.9.5