From: Imre Deak <imre.deak@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: get runtime PM reference around GEM set_caching IOCTL
Date: Mon, 09 Nov 2015 15:36:10 +0200 [thread overview]
Message-ID: <1447076170.24533.73.camel@intel.com> (raw)
In-Reply-To: <20151109132552.GF22414@nuc-i3427.alporthouse.com>
On ma, 2015-11-09 at 13:25 +0000, Chris Wilson wrote:
> On Mon, Nov 09, 2015 at 03:09:18PM +0200, Imre Deak wrote:
> > Looked through it, it seems only i915_gem_set_tiling() could
> > release
> > the PTE's without waking up the hardware (if no need to unbind the
> > object). Otherwise it's true that all callers hold (or should hold)
> > already an RPM ref. To fix the set tiling case to work after your
> > optimization we could wake up the HW unconditionally there, use a
> > no_resume RPM ref+and RPM barrier or a separate new lock for the
> > fault
> > list.
>
> I was suggesting we move to the model where writes through gsm took
> the
> rpm reference itself.
Yes, but even then you want to have a lock around updating the new
fault list, no? So if we go with your way and push down the RPM ref
where GSM is written, we wouldn't have a lock around the fault_list
update in i915_gem_set_tiling() (via i915_gem_release_mmap()). That's
where I meant we need an extra ref/lock above.
> > > From the rpm point of view, this should improve the success of
> > > runtime suspend, and reduce wakelocks.
> >
> > Yes, seems like a worthy optimization, since I assume struct_mutex
> > can
> > be held for a long time without the need to wake up the hardware.
>
> Admittedly most of the time we hold struct_mutex, the hw will be
> awake
> for other reasons. But there are many times where we do take the
> struct_mutex for 10s (if not 100s!) of milliseconds where the hw is
> completely idle, and so every chance to reduce usage/contention on
> struct_mutex is a little victory.
>
> > Are you ok to first have the fix I posted and a similar one for
> > i915_gem_set_tiling()? And then to follow-up with your plan.
>
> Yes, adding the extra reference to that ioctl, juggling with the
> struct_mutex and then moving the rpm reference to where it is
> required
> lgtm.
Ok, will post a new one for set_tiling.
--Imre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-11-09 13:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 19:25 [PATCH] drm/i915: get runtime PM reference around GEM set_caching IOCTL Imre Deak
2015-11-04 19:47 ` Paulo Zanoni
2015-11-16 13:33 ` Jani Nikula
2015-11-17 19:00 ` Daniel Vetter
2015-11-17 19:22 ` Imre Deak
2015-11-04 20:57 ` Chris Wilson
2015-11-05 11:28 ` Imre Deak
2015-11-05 11:56 ` Chris Wilson
2015-11-05 22:57 ` Imre Deak
2015-11-05 23:24 ` Imre Deak
2015-11-06 8:54 ` Chris Wilson
2015-11-09 13:09 ` Imre Deak
2015-11-09 13:25 ` Chris Wilson
2015-11-09 13:36 ` Imre Deak [this message]
2015-11-09 13:43 ` Chris Wilson
2015-11-17 22:16 ` Daniel Vetter
2015-11-17 22:38 ` Chris Wilson
2015-11-17 22:49 ` Imre Deak
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=1447076170.24533.73.camel@intel.com \
--to=imre.deak@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.