i915/gem_ppgtt: Estimate resource usage and bail if it means swapping!
fi-kbl-guc's swap ran dry while running blt-vs-render-ctxN, which is mildly concerning but conceivable as we never checked there was enough memory to run the test to begin with. Each child needs to keep its own surface and possible a pair of logical contexts (one for rcs and one for bcs) so check that there is enough memory to allow all children to co-exist. During execution, we require another surface and batch, but these are temporary and so should fit fine with a small amount of thrashing on the boundary. References: https://bugs.freedesktop.org/show_bug.cgi?id=109801Signed-off-by: Chris Wilson <firstname.lastname@example.org> Reviewed-by: Mika Kuoppala <email@example.com>
Showing with 6 additions and 0 deletions