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 <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
gem_read(fd, handle, 0, &handle, sizeof(handle));
}
-#define NUM_FD 32000
+#define NUM_FD 768
struct thread {
pthread_mutex_t mutex;
}
igt_subtest("process-exit") {
- igt_fork(child, 2000)
+ igt_fork(child, NUM_FD)
run(child);
igt_waitchildren();
}