From: Daniel Vetter Subject: Re: [PATCH 0/3] RFC: force throttling/fairness Date: Sat, 29 Oct 2011 21:47:04 +0200 Message-ID: <20111029194704.GG2932@phenom.ffwll.local> References: <1319867729-8676-1-git-send-email-ben@bwidawsk.net> <87mxcjr60h.fsf@eliezer.anholt.net> <20111029122225.42480208@bwidawsk.net> <20111029194057.GF2932@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com [74.125.82.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B2759E88F for ; Sat, 29 Oct 2011 12:46:10 -0700 (PDT) Received: by wwe32 with SMTP id 32so3616647wwe.0 for ; Sat, 29 Oct 2011 12:46:09 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20111029194057.GF2932@phenom.ffwll.local> 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: Daniel Vetter , intel-gfx@lists.freedesktop.org, "Lecluse, Philippe" List-Id: intel-gfx@lists.freedesktop.org On Sat, Oct 29, 2011 at 09:40:57PM +0200, Daniel Vetter wrote: > On Sat, Oct 29, 2011 at 12:22:25PM -0700, Ben Widawsky wrote: > > On Sat, 29 Oct 2011 11:45:34 -0700 > > Eric Anholt wrote: > > > > > On Sat, 29 Oct 2011 09:07:35 +0100, Chris Wilson wrote: > > > > On Fri, 28 Oct 2011 22:55:26 -0700, Ben Widawsky wrote: > > > > > These patches are pretty raw as I'm hoping to get some comments before > > > > > working to hard too clean them up. The goal is GPU fairness for clients > > > > > running on i915. > > > > > > > > The biggest danger I see is that num_outstanding is only decremented > > > > in retire_requests, which under the right circumstances (a single hog or > > > > a plurarity) will cause latencies of over 1s. Also this unnecessarily > > > > penalises benchmarks, i.e. a single active client. > > > > > > Just using wait_request interface would require less code and not have > > > that issue. > > > > I must be missing something simple, but I didn't see an easy way to use > > that interface to do what I want. Instead of outstanding requests, I'd > > need to start tracking per fd seqnos (yes it's done elsewhere, but > > didn't seem much different to me). > > We track request per-fd already in the file_priv, so if the oustanding > requests is already at the limit and would go over the top with an > additional request, you can just look at the previously submitted request > for this fd, grab it's seqno and wait for that. The ugly part then just > boils down to allowing wait_request without the struct_mutex held. But > that's rather generally usefull infrastructure. Meh, not wait on the previously submitted req, but the first one to retire next, obviously. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48