tests/gem_close_race: Adapt the test for Full PPGTT
PATCH v2 2/3 tests/gem_close_race: Adapt the test for Full PPGTT
From: Oscar Mateo <[email protected]>
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
--- tests/gem_close_race.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/gem_close_race.c +2 -2
@@ -136,7 +136,7 @@ static void run(int child)gem_read (fd, handle,0 , &handle,sizeof (handle)); } -#define NUM_FD 32000 +#define NUM_FD 768struct 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 (); }
Signature · 1 line
1.7.9.5
Daniel Vetter
AppliedQuoted 9 lines · On Fri, Dec 13, 2013 at 04:24:37PM +0000, [email protected] wrote:
From: Oscar Mateo <[email protected]>
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.
Quoted 4 lines
v2: Unconditionally use the lower limit, as suggested by Daniel Vetter
Signed-off-by Oscar Mateo <[email protected]>
Merged, thanks for the patch. And --in-reply-to preferred for resending ;-)
-Daniel
Quoted 33 lines
--- tests/gem_close_race.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tests/gem_close_race.c +2
-2@@ -136,7 +136,7 @@ static void run(int child)gem_read (fd, handle,0 , &handle,sizeof (handle)); } -#define NUM_FD 32000 +#define NUM_FD 768struct 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 (); }Signature · 6 lines
1.7.9.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch