]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reduce memory pressure during shrinker by preallocating swizzle pages
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 3 Dec 2012 21:03:14 +0000 (21:03 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 7 Dec 2012 00:16:15 +0000 (01:16 +0100)
commita48bc82dd4bf80d5db4cd249fb547df44f6224cc
tree5eef72c851d44d956d20e81678123146a2d71542
parente80a380255eca4b2d87104270dcc79cfaa05b94c
drm/i915: Reduce memory pressure during shrinker by preallocating swizzle pages

On a machine with bit17 swizzling, we need to store the bit17 of the
physical page address in put-pages. This requires a memory allocation,
on average less than a page, which may be difficult to satisfy is the
request to put-pages is on behalf of the shrinker. We could allow that
allocation to pull from the reserved memory pools, but it seems much
safer to preallocate the array for tiled objects on affected machines.

v2: Export i915_gem_object_needs_bit17_swizzle() for reuse.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_tiling.c