From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Wait and retry if there is no space in the aperture mappable area Date: Tue, 22 Oct 2013 14:30:40 +0200 Message-ID: <20131022123039.GO4830@phenom.ffwll.local> References: <1382443455.7976.49.camel@asiluver-linux.isw.intel.com> <20131022121532.GF6083@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by gabe.freedesktop.org (Postfix) with ESMTP id DCA0AE5C1D for ; Tue, 22 Oct 2013 05:30:20 -0700 (PDT) Received: by mail-ee0-f42.google.com with SMTP id b45so4419376eek.15 for ; Tue, 22 Oct 2013 05:30:19 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20131022121532.GF6083@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , "Siluvery, Arun" , "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org 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" > > > > 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 optimistic. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch