[Intel-gfx] [PATCH] drm/i915: Wait and retry if there is no space in the aperture mappable area
daniel at ffwll.ch
Tue Oct 22 14:30:40 CEST 2013
On Tue, Oct 22, 2013 at 01:15:32PM +0100, Chris Wilson wrote:
> On Tue, Oct 22, 2013 at 12:04:17PM +0000, Siluvery, Arun wrote:
> > From: "Siluvery, Arun" <arun.siluvery at intel.com>
> > When a mapping is requested and if there is no space the mapping fails
> > and the region is not physically backed. This results in
> > signal 7(SIGBUS), code 2 (BUS_ADRERR) when it is actually accessed.
> > This patch handles this error, continues to wait and retries to find space.
> Eh, no. The line before will remove everything from the aperture that is
> unpinned. Throwing an evict_everything in here breaks reservations, so I
> think you are just papering over a bug.
If we want to fix this for real (i.e. allow userspace to reliably map
stuff, mabye even bigger than the aperture) we need to fall back to
suballocating tile-row aligned strides of the buffer (maybe pick the tile
row multiply in between 1M-2M). Until that's done userspace can't rely on
gtt mmaps relibly working for large buffers. The current heuristics we're
using is half of the mappable space, but that's probably a bit too
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx