<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI Emoji";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-compose;
font-family:"Times New Roman",serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt">Hi Maarten:<br>
<br>
Thanks for the reply. </span><span style="font-size:10.0pt;font-family:"Segoe UI Emoji",sans-serif">😊</span><span style="font-size:10.0pt"> Have your patches been merged into the drm-intel? (The new i915_gem_object_ggtt_pin() you mentioned in the email). Also,
we might go on-demand pin recently in the suspend/resume support. In that case, I guess I need to review my patches again based on the new mechanism. Wrt your concern, my understanding is ww dance is for recording the related locks in a section. When a deadlock
happens, we can rewind the locks recorded in a ww dance and rewind them. In the current code, the context is always pinned. So we don’t need to worry about the context as what you said. For preparing_shadow_wa_ctx, the gem object will be newly created whenever
scan a execlist context and it will be destroyed when the context is scheduled-out. I think in that case, we need a separate ww dance.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt">Thanks, Zhi.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt"><br>
-----Original Message-----<br>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> <br>
Sent: Wednesday, September 30, 2020 2:55 PM<br>
To: Wang, Zhi A <zhi.a.wang@intel.com>; Joonas Lahtinen <joonas.lahtinen@linux.intel.com>; Nikula, Jani <jani.nikula@intel.com>; intel-gfx <intel-gfx@lists.freedesktop.org>; Yuan, Hang <hang.yuan@intel.com>; Lv, Zhiyuan <zhiyuan.lv@intel.com>; intel-gvt-dev
<intel-gvt-dev@lists.freedesktop.org><br>
Subject: Re: [Intel-gfx] [PULL] topic/gvt-ww-lock<br>
<br>
Hey,<br>
<br>
Op 22-09-2020 om 13:51 schreef Wang, Zhi A:<br>
><br>
> Hi,<br>
><br>
> Here's the patch which introduces GVT-g ww lock support against drm-intel-gt-next branch.<br>
><br>
> Thanks<br>
><br>
> --<br>
><br>
> The following changes since commit 4316b19dee27cc5cd34a95fdbc0a3a5237507701:<br>
><br>
> drm/i915: Fix uninitialised variable in <br>
> intel_context_create_request. (2020-09-21 11:09:46 +0200)<br>
><br>
> are available in the git repository at:<br>
><br>
> <a href="https://github.com/intel/gvt-linux.git" target="_BLANK">https://github.com/intel/gvt-linux.git</a> tags/gvt-ww-lock-09-22-2020<br>
><br>
> for you to fetch changes up to e1b49ae155451aaa039eeb23fce808c71a038283:<br>
><br>
> drm/i915/gvt: Introduce per object locking in GVT scheduler. <br>
> (2020-09-22 12:09:56 +0300)<br>
><br>
> ----------------------------------------------------------------<br>
> gvt-ww-lock-09-22-2020:<br>
><br>
> - Introduce ww lock support into GVT-g.<br>
><br>
> ----------------------------------------------------------------<br>
> Zhi Wang (1):<br>
> drm/i915/gvt: Introduce per object locking in GVT scheduler.<br>
><br>
> drivers/gpu/drm/i915/gvt/scheduler.c | 68 <br>
> ++++++++++++++++++++++++++++++------<br>
> 1 file changed, 57 insertions(+), 11 deletions(-)<br>
<br>
I've taken a look at this branch, and I have some feedback.<br>
<br>
Adding ww_ctx blindly like is done doesn't work. For example I'm working on a patch that adds ww handling to i915_gem_object_ggtt_pin(), so you don't have to perform manually in prepare_shadow_wa_ctx(). intel_context_pin() already has a ww dance, you can keep
calling it without open coding it. If you do decide to call it manually, intel_context_put would have to be called after ctx_fini. Cheers, Maarten<o:p></o:p></span></p>
</div>
</body>
</html>