From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Prevent signals from interrupting close() Date: Wed, 9 Apr 2014 18:50:03 +0200 Message-ID: <20140409165003.GA9262@phenom.ffwll.local> References: <1397027019-16634-1-git-send-email-chris@chris-wilson.co.uk> <20140409144902.GF9262@phenom.ffwll.local> <20140409150323.GA14192@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-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id E99026E06D for ; Wed, 9 Apr 2014 09:50:06 -0700 (PDT) Received: by mail-ee0-f49.google.com with SMTP id c41so2100699eek.8 for ; Wed, 09 Apr 2014 09:50:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140409150323.GA14192@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Daniel Vetter , intel-gfx@lists.freedesktop.org, Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Wed, Apr 09, 2014 at 04:03:23PM +0100, Chris Wilson wrote: > On Wed, Apr 09, 2014 at 04:49:02PM +0200, Daniel Vetter wrote: > > On Wed, Apr 09, 2014 at 08:03:39AM +0100, Chris Wilson wrote: > > > We neither report any unfinished operations during releasing GEM objects > > > associated with the file, and even if we did, it is bad form to report > > > -EINTR from a close(). > > > > > > The root cause of the bug that first showed itself during close is that > > > we do not do proper live tracking of vma and contexts under full-ppgtt, > > > but this is useful piece of defensive programming enforcing our > > > userspace API contract. > > > > > > Cc: Ben Widawsky > > > Signed-off-by: Chris Wilson > > > > I'd really prefer something annoying and loud like we've done when nuking > > the deferred free list in > > > > commit 1488fc08c1706288616c602416654fd38c773deb > > Author: Chris Wilson > > Date: Tue Apr 24 15:47:31 2012 +0100 > > > > drm/i915: Remove the deferred-free list > > > > where we've added a WARN_ON in gem_free_object if any unbind was failing > > due to interrupts. This patch here disables that imo useful safety check. > > It doesn't classify as a safety check if kernel/userspace explodes. The > trick would be to somehow get the error code back. And in this case we > cannot accept any error anyway. So yes, I would like a nice big warning > to catch bugs, but that is icing on the cake compared to preventing bugs > from destroying data. Hm ... double-checking: This is just for full ppgtt, right? I think in that case I prefer if people working on it just carry this around locally. Otherwise I need to freak out ;-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch