From: Ben Widawsky Subject: Re: [PATCH] drm/i915: Fix recursive calls to unmap Date: Sat, 29 Oct 2011 19:56:43 -0700 Message-ID: <20111029195643.3aab127a@bwidawsk.net> References: <1319940443-5312-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 2235E9EEDE for ; Sat, 29 Oct 2011 19:57:49 -0700 (PDT) In-Reply-To: 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: Keith Packard Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sat, 29 Oct 2011 19:51:26 -0700 Keith Packard wrote: > On Sat, 29 Oct 2011 19:07:23 -0700, Ben Widawsky wrote: > > > + /** > > + * Flag if GTT ptes shouldn't be modified. > > + * > > + * This is set when graphics virtual address space > > + * should not be changed. It's currently only useful for > > + * a workaround which requires that we serialize unmaps. > > + */ > > + bool freeze_ptes; > > + > > Yucky. yucky. yucky. > > What I expected was to see an extra argument passed down through the > call chain instead of a global variable here. > Sigh. I started down that path, but it was becoming tedious with only one case where we actually want to not retire (I think), so I thought I'd see how this went down on the mailing list. The other nice thing was it was really easy to detect if we recurse (with the added WARN_ON) when someone adds some similar code in the future. I can do it the way you expected.