tests/gem_close_race: Adapt the test for Full PPGTT
authorOscar Mateo <oscar.mateo@intel.com>
Fri, 13 Dec 2013 16:24:37 +0000 (16:24 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 13 Dec 2013 16:49:13 +0000 (17:49 +0100)
commit4eae05f03b893e2e7b2eb0e0d9799fe0228393bb
tree8010f6753d5e283b595503b4216c447aea467feb
parentbe14c7bb04664a515df11c21f90a0f29c7756e6b
tests/gem_close_race: Adapt the test for Full PPGTT

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>
tests/gem_close_race.c