From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752915AbcHONua (ORCPT ); Mon, 15 Aug 2016 09:50:30 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35350 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbcHONu2 (ORCPT ); Mon, 15 Aug 2016 09:50:28 -0400 Date: Mon, 15 Aug 2016 15:50:24 +0200 From: Daniel Vetter To: Maarten Lankhorst Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Stone , Daniel Vetter , Rob Clark , Greg Hackmann , John Harrison , laurent.pinchart@ideasonboard.com, seanpaul@google.com, marcheu@google.com, m.chehab@samsung.com, Sumit Semwal , Gustavo Padovan Subject: Re: [PATCH 2/2] drm/fence: allow fence waiting to be interrupted by userspace Message-ID: <20160815135024.GF6232@phenom.ffwll.local> Mail-Followup-To: Maarten Lankhorst , Gustavo Padovan , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Stone , Rob Clark , Greg Hackmann , John Harrison , laurent.pinchart@ideasonboard.com, seanpaul@google.com, marcheu@google.com, m.chehab@samsung.com, Sumit Semwal , Gustavo Padovan References: <1470940785-25870-1-git-send-email-gustavo@padovan.org> <1470940785-25870-2-git-send-email-gustavo@padovan.org> <9e717fc1-e259-62ce-7e23-269c0db33f9a@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9e717fc1-e259-62ce-7e23-269c0db33f9a@linux.intel.com> X-Operating-System: Linux phenom 4.6.0-1-amd64 User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 15, 2016 at 12:15:32PM +0200, Maarten Lankhorst wrote: > Op 11-08-16 om 20:39 schreef Gustavo Padovan: > > From: Gustavo Padovan > > > > If userspace is running an synchronously atomic commit and interrupts the > > atomic operation during fence_wait() it will hang until the timer expires, > > so here we change the wait to be interruptible so it stop immediately when > > userspace wants to quit. > > > > Also adds the necessary error checking for fence_wait(). > > > > v2: Comment by Daniel Vetter > > - Add error checking for fence_wait() > > > > v3: Rebase on top of new atomic noblocking support > Meh, I don't like the swapped parameter much, couldn't we infer it from intr? or rename intr to swapped? > If we're not swapped yet, we should always wait interruptibly. When swapped, never.. Yeah this seems somewhat silly tbh, but then I guess making those waits interruptible is indeed somewhat nice. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch