Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752318AbbKORsr (ORCPT ); Sun, 15 Nov 2015 12:48:47 -0500 Received: from mail.fireflyinternet.com ([87.106.93.118]:49500 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752135AbbKORsq (ORCPT ); Sun, 15 Nov 2015 12:48:46 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Date: Sun, 15 Nov 2015 17:48:23 +0000 From: Chris Wilson To: Jens Axboe , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, Daniel Vetter , Tvrtko Ursulin , Eero Tamminen , "Rantala, Valtteri" , stable@kernel.vger.org Subject: Re: [PATCH 2/2] drm/i915: Limit the busy wait on requests to 2us not 10ms! Message-ID: <20151115174823.GP569@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Jens Axboe , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Tvrtko Ursulin , Eero Tamminen , "Rantala, Valtteri" , stable@kernel.vger.org References: <1447594364-4206-1-git-send-email-chris@chris-wilson.co.uk> <1447594364-4206-2-git-send-email-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447594364-4206-2-git-send-email-chris@chris-wilson.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 703 Lines: 20 On Sun, Nov 15, 2015 at 01:32:44PM +0000, Chris Wilson wrote: > +static bool busywait_stop(u64 timeout, unsigned cpu) > +{ > + unsigned this_cpu; > + > + if (time_after64(local_clock_us(&this_cpu), timeout)) > + return true; Just a note to say that we can use the unsigned long version rather than pass around u64 as this test will wraparound correctly (if we discard the high bits on x86-32). -Chris -- Chris Wilson, Intel Open Source Technology Centre -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/