From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugeni Dodonov Subject: Re: [PATCH 1/4 v4] drm/i915: timeout parameter for seqno wait Date: Fri, 11 May 2012 20:09:48 -0300 Message-ID: <4FAD9C3C.9020807@linux.intel.com> References: <1336769652-11740-1-git-send-email-ben@bwidawsk.net> Reply-To: eugeni.dodonov@intel.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 092B2A0CFE for ; Fri, 11 May 2012 16:09:16 -0700 (PDT) In-Reply-To: <1336769652-11740-1-git-send-email-ben@bwidawsk.net> 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: Ben Widawsky Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 05/11/2012 05:54 PM, Ben Widawsky wrote: > Insert a wait parameter in the code so we can possibly timeout on a > seqno wait if need be. The code should be functionally the same as > before because all the callers will continue to retry if an arbitrary > timeout elapses. > > We'd like to have nanosecond granularity, but the only way to do this is > with hrtimer, and that doesn't fit well with the needs of this code. > > v2: Fix rebase error (Chris) > Return proper time even in wedged + signal case (Chris + Ben) > Use timespec constructs (Ben) > Didn't take Daniel's advice regarding the Frankenstein-ness of the > function. I did try his advice, but in the end I liked the way the > original code looked, better. > > v3: Make wakeups far less frequent for infinite waits (Chris) > > v4: Remove dummy_wait variable (Daniel) > Use raw monotonic time instead of jiffies (made the code a bit cleaner) (Ben) > Added a couple of warnings (Ben) > > Signed-off-by: Ben Widawsky I couldn't find much to bikeshed here except for question on patch 3 and one small typo on Patch 4. So for the series: Reviewed-by: Eugeni Dodonov