<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 07-09-2023 14:19, Upadhyay, Tejas
wrote:<br>
</div>
<blockquote type="cite" cite="mid:SJ1PR11MB62044B92B265221880903F5081EEA@SJ1PR11MB6204.namprd11.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style>@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:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}code
{mso-style-priority:99;
font-family:"Courier New";}pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Ghimiray, Himal Prasad
<a class="moz-txt-link-rfc2396E" href="mailto:himal.prasad.ghimiray@intel.com"><himal.prasad.ghimiray@intel.com></a>
<br>
<b>Sent:</b> Wednesday, September 6, 2023 3:18 PM<br>
<b>To:</b> Upadhyay, Tejas
<a class="moz-txt-link-rfc2396E" href="mailto:tejas.upadhyay@intel.com"><tejas.upadhyay@intel.com></a>;
<a class="moz-txt-link-abbreviated" href="mailto:intel-xe@lists.freedesktop.org">intel-xe@lists.freedesktop.org</a><br>
<b>Cc:</b> Iddamsetty, Aravind
<a class="moz-txt-link-rfc2396E" href="mailto:aravind.iddamsetty@intel.com"><aravind.iddamsetty@intel.com></a><br>
<b>Subject:</b> Re: [PATCH 4/7] drm/xe: Record each
drm client with its VM<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 31-08-2023 14:35, Tejas Upadhyay
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>Enable accounting of indirect client memory usage.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Signed-off-by: Tejas Upadhyay <a href="mailto:tejas.upadhyay@intel.com" moz-do-not-send="true"><tejas.upadhyay@intel.com></a><o:p></o:p></pre>
<pre>---<o:p></o:p></pre>
<pre> drivers/gpu/drm/xe/xe_vm.c | 1 +<o:p></o:p></pre>
<pre> drivers/gpu/drm/xe/xe_vm_types.h | 2 ++<o:p></o:p></pre>
<pre> 2 files changed, 3 insertions(+)<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c<o:p></o:p></pre>
<pre>index 9cbf2f63d641..f5f832c8ed42 100644<o:p></o:p></pre>
<pre>--- a/drivers/gpu/drm/xe/xe_vm.c<o:p></o:p></pre>
<pre>+++ b/drivers/gpu/drm/xe/xe_vm.c<o:p></o:p></pre>
<pre>@@ -2057,6 +2057,7 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data,<o:p></o:p></pre>
<pre> }<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> args->vm_id = id;<o:p></o:p></pre>
<pre>+ vm->xef = xef;<o:p></o:p></pre>
</blockquote>
<p class="MsoNormal">shouldn't it be applicable only if <code><span style="font-size:10.0pt">CONFIG_PROC_FS is enabled ?
<o:p></o:p></span></code></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Tracking VM is not dependent on proc fs
so it does not give relation. Adding bo and FDINFO
read/parse is only dependent on procfs otherwise dummy
calls. So I do not think it is necessary. Please let me know
if you think otherwise.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Tejas </p>
</div>
</div>
</blockquote>
<p>Do we have any other use case in mind for vm tracking ? If yes
let it be as it is, otherwise making it procfs config dependent is
better.<br>
</p>
<p>BR</p>
<p>Himal Ghimiray<br>
</p>
<blockquote type="cite" cite="mid:SJ1PR11MB62044B92B265221880903F5081EEA@SJ1PR11MB6204.namprd11.prod.outlook.com">
<div class="WordSection1">
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><o:p> </o:p></pre>
<pre> <o:p></o:p></pre>
<pre> #if IS_ENABLED(CONFIG_DRM_XE_DEBUG_MEM)<o:p></o:p></pre>
<pre> /* Warning: Security issue - never enable by default */<o:p></o:p></pre>
<pre>diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h<o:p></o:p></pre>
<pre>index fd2178dbde3a..db8523d81d0f 100644<o:p></o:p></pre>
<pre>--- a/drivers/gpu/drm/xe/xe_vm_types.h<o:p></o:p></pre>
<pre>+++ b/drivers/gpu/drm/xe/xe_vm_types.h<o:p></o:p></pre>
<pre>@@ -336,6 +336,8 @@ struct xe_vm {<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> /** @batch_invalidate_tlb: Always invalidate TLB before batch start */<o:p></o:p></pre>
<pre> bool batch_invalidate_tlb;<o:p></o:p></pre>
<pre>+ /** @xef: XE file handle for tracking this VM's drm client */<o:p></o:p></pre>
<pre>+ struct xe_file *xef;<o:p></o:p></pre>
</blockquote>
<p class="MsoNormal">Same comment as above.<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><o:p> </o:p></pre>
<pre> };<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> /** struct xe_vma_op_map - VMA map operation */<o:p></o:p></pre>
</blockquote>
</div>
</div>
</blockquote>
</body>
</html>