Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Keith Packard <keithp@keithp.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Fix recursive calls to unmap
Date: Sat, 29 Oct 2011 19:56:43 -0700	[thread overview]
Message-ID: <20111029195643.3aab127a@bwidawsk.net> (raw)
In-Reply-To: <yunpqhf2nv5.fsf@aiko.keithp.com>

On Sat, 29 Oct 2011 19:51:26 -0700
Keith Packard <keithp@keithp.com> wrote:

> On Sat, 29 Oct 2011 19:07:23 -0700, Ben Widawsky <ben@bwidawsk.net> 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.

  reply	other threads:[~2011-10-30  2:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-30  2:07 [PATCH] drm/i915: Fix recursive calls to unmap Ben Widawsky
2011-10-30  2:51 ` Keith Packard
2011-10-30  2:56   ` Ben Widawsky [this message]
2011-10-30  4:10     ` Keith Packard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111029195643.3aab127a@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox