From: "Thomas Hellström (Intel)" <thomas_os@shipmail.org>
To: intel-gfx@lists.freedesktop.org
Cc: maarten.lankhorst@intel.com, chris@chris-wilson.co.uk
Subject: [Intel-gfx] [RFC PATCH v2 0/2] Introduce a ww transaction utility
Date: Thu, 17 Sep 2020 20:59:43 +0200 [thread overview]
Message-ID: <20200917185945.11734-1-thomas_os@shipmail.org> (raw)
A ww transaction utility intended to help removing the
obj->mm.lock from the driver and introduce ww transactions
in a robust way.
Patch 1/2 breaks the current i915 utilities out to separate files
Patch 2/2 introduces the ww transaction utility
A similar utility could easily be introduced in the core
ww_mutex code, allowing even for cross-driver ww transactions,
and the template argument could then allow for per-ww-class derived
ww_acquire_mutex types. To facilitate a core implementation, (since we
can never guarantee the contended lock stays alive), we'd need a
void ww_mutex_relax(struct ww_acquire_ctx *)
and its interruptible variant that does the equivalent of
locking and unlocking the contended mutex.
With this driver implementation, we can extend the code to take a
reference on the object containing the contended lock to make sure
it stays alive.
Finally, the drawback of the current implementation is the use of the hash
table and corresponding performance cost, but as mentioned in
patch 2, a core variant could probably do this in a much more
efficient way.
v2: Version 1 of patch 2 was obviously a WIP patch. Fix that.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2020-09-17 19:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 18:59 Thomas Hellström (Intel) [this message]
2020-09-17 18:59 ` [Intel-gfx] [RFC PATCH v2 1/2] drm/i915: Break out dma_resv ww locking utilities to separate files Thomas Hellström (Intel)
2020-09-17 18:59 ` [Intel-gfx] [RFC PATCH v2 2/2] drm/i915: Introduce a i915_gem_do_ww(){} utility Thomas Hellström (Intel)
2020-09-22 9:12 ` Tvrtko Ursulin
2020-09-22 13:31 ` Thomas Hellström (Intel)
2020-09-17 19:16 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Introduce a ww transaction utility (rev2) Patchwork
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=20200917185945.11734-1-thomas_os@shipmail.org \
--to=thomas_os@shipmail.org \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@intel.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