drm/vmwgfx: Don't use memory accounting for kernel-side fence objects
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 2 Dec 2014 11:32:24 +0000 (03:32 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 20 Feb 2015 00:49:29 +0000 (00:49 +0000)
commitdff2114565cb20a491ae34b5ac6a83402c3151bd
tree21f179088dc9deaf50789dc6214242b78f332842
parentc17a5f8956af869bd85195fc4f980a1acce03574
drm/vmwgfx: Don't use memory accounting for kernel-side fence objects

commit 1f563a6a46544602183e7493b6ef69769d3d76d9 upstream.

Kernel side fence objects are used when unbinding resources and may thus be
created as part of a memory reclaim operation. This might trigger recursive
memory reclaims and result in the kernel running out of stack space.

So a simple way out is to avoid accounting of these fence objects.
In principle this is OK since while user-space can trigger the creation of
such objects, it can't really hold on to them. However, their lifetime is
quite long, so some form of accounting should perhaps be implemented in the
future.

Fixes kernel crashes when running, for example viewperf11 ensight-04 test 3
with low system memory settings.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c