<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:Aptos;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@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" style="word-wrap:break-word">
<div class="WordSection1">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Randhawa, Jagmeet <jagmeet.randhawa@intel.com>
<br>
<b>Sent:</b> Wednesday, October 23, 2024 1:29 PM<br>
<b>To:</b> Cavitt, Jonathan <jonathan.cavitt@intel.com><br>
<b>Cc:</b> igt-dev@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH] [i-g-t] tests/intel/xe_vm:Reduce n_execs for bind-array-enobufs<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">> >
</span>> <o:p></o:p></p>
<p class="MsoNormal">> > > <o:p></o:p></p>
<div>
<p class="MsoNormal">> > > On 10/23/2024 7:12 AM, Cavitt, Jonathan wrote:<o:p></o:p></p>
<p class="MsoNormal">> > > -----Original Message-----<o:p></o:p></p>
<p class="MsoNormal">> > > From: Randhawa, Jagmeet <a href="mailto:jagmeet.randhawa@intel.com">
<span style="color:windowtext;text-decoration:none"><jagmeet.randhawa@intel.com></span></a>
<o:p></o:p></p>
<p class="MsoNormal">> > > Sent: Tuesday, October 22, 2024 1:12 PM<o:p></o:p></p>
<p class="MsoNormal">> > > Cc: <a href="mailto:igt-dev@lists.freedesktop.org"><span style="color:windowtext;text-decoration:none">igt-dev@lists.freedesktop.org</span></a>; Cavitt, Jonathan
<a href="mailto:jonathan.cavitt@intel.com"><span style="color:windowtext;text-decoration:none"><jonathan.cavitt@intel.com></span></a>; Zuo, Alex
<a href="mailto:alex.zuo@intel.com"><span style="color:windowtext;text-decoration:none"><alex.zuo@intel.com></span></a>; Konieczny, Kamil
<a href="mailto:kamil.konieczny@intel.com"><span style="color:windowtext;text-decoration:none"><kamil.konieczny@intel.com></span></a>; Randhawa, Jagmeet
<a href="mailto:jagmeet.randhawa@intel.com"><span style="color:windowtext;text-decoration:none"><jagmeet.randhawa@intel.com></span></a><o:p></o:p></p>
<p class="MsoNormal">> > > Subject: [PATCH] [i-g-t] tests/intel/xe_vm:Reduce n_execs for bind-array-enobufs<o:p></o:p></p>
<p class="MsoNormal">> > > <o:p></o:p></p>
<p class="MsoNormal">> > > The bind-array-enobufs test in xe_vm.c is intended to trigger<o:p></o:p></p>
<p class="MsoNormal">> > > an -ENOBUFS error by submitting an oversized bind array.<o:p></o:p></p>
<p class="MsoNormal">> > > After encountering and handling the error, the test reduces<o:p></o:p></p>
<p class="MsoNormal">> > > n_execs by half and retries the operation. On some environments<o:p></o:p></p>
<p class="MsoNormal">> > > with stricter resource limits (e.g. simulator),<o:p></o:p></p>
<p class="MsoNormal">> > > <o:p></o:p></p>
<p class="MsoNormal">> > Is it "just" simulator this is an issue on? Because if so, we could probably<o:p></o:p></p>
<p class="MsoNormal">> > use igt_run_in_simulation() to narrow the scope:<o:p></o:p></p>
<p class="MsoNormal">> > <o:p></o:p></p>
<p class="MsoNormal">> > """<o:p></o:p></p>
<p class="MsoNormal">> > xe_cork_fini(&cork);<o:p></o:p></p>
<p class="MsoNormal">> > - n_execs = n_execs / 2;<o:p></o:p></p>
<p class="MsoNormal">> > + n_execs /= igt_run_in_simulation() ? 4 : 2;<o:p></o:p></p>
<p class="MsoNormal">> > }<o:p></o:p></p>
<p class="MsoNormal">> > """<o:p></o:p></p>
<p class="MsoNormal">> > <o:p></o:p></p>
<p class="MsoNormal">> > If not, then<o:p></o:p></p>
<p class="MsoNormal">> > Reviewed-by: Jonathan Cavitt <a href="mailto:jonathan.cavitt@intel.com">
<span style="color:windowtext;text-decoration:none"><jonathan.cavitt@intel.com></span></a><o:p></o:p></p>
<p class="MsoNormal">> > -Jonathan Cavitt<o:p></o:p></p>
<p class="MsoNormal">> <span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt">> </span>Thank you for your comment and review Jonathan. Oddly when I tested the following line<o:p></o:p></p>
<p class="MsoNormal">> "n_execs /= igt_run_in_simulation() ? 4 : 2;" The test fails as it was before the original patch was sent<o:p></o:p></p>
<p class="MsoNormal">> so I suspect igt_run_in_simulation() is returning false and we are taking the "2" integer in this case.<o:p></o:p></p>
<p class="MsoNormal">> I believe it is just simulator we are facing this issue on, however I think leaving the code as
<o:p></o:p></p>
<p class="MsoNormal">> "n_execs = n_execs / 4;" doesn't do any harm if we run it on any other platform such as hardware<o:p></o:p></p>
<p class="MsoNormal">> , as it does not affect the basis of the test which is to trigger enobufs error, handle it, and then
<o:p></o:p></p>
<p class="MsoNormal">> run with less n_execs to pass on the next iterations. This patch will just accelerate the test on hardware.<o:p></o:p></p>
<p class="MsoNormal">> If this works with you, may I ask if I still have your reviewed-by? I can change it and investigate<o:p></o:p></p>
<p class="MsoNormal">> if you feel strongly about it. Thanks again.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">That’s certainly strange, but I’ll accept that as an explanation. My Reviewed-by stands.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-Jonathan Cavitt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal">> <span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> </span>Jagmeet<o:p></o:p></p>
<p class="MsoNormal">> <span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> </span>> > <o:p></o:p></p>
<p class="MsoNormal">> > > <o:p></o:p></p>
<p class="MsoNormal">> > > halving n_execs isn't sufficient to prevent the ENOBUFS error on the retry.<o:p></o:p></p>
<p class="MsoNormal">> > > Reducing n_execs further to n_execs / 4 allows the test to pass<o:p></o:p></p>
<p class="MsoNormal">> > > successfully. This patch modifies the test to reduce n_execs<o:p></o:p></p>
<p class="MsoNormal">> > > to n_execs / 4 after an ENOBUFS error is handled. This ensures<o:p></o:p></p>
<p class="MsoNormal">> > > compatibility with environments that have tighter resource<o:p></o:p></p>
<p class="MsoNormal">> > > constraints while maintaining the test's integrity.<o:p></o:p></p>
<p class="MsoNormal">> > > > Cc: Jonathan Cavitt <a href="mailto:jonathan.cavitt@intel.com">
<span style="color:windowtext;text-decoration:none"><jonathan.cavitt@intel.com></span></a><o:p></o:p></p>
<p class="MsoNormal">> > > Signed-off-by: Jagmeet Randhawa <a href="mailto:jagmeet.randhawa@intel.com">
<span style="color:windowtext;text-decoration:none"><jagmeet.randhawa@intel.com></span></a><o:p></o:p></p>
<p class="MsoNormal">> > > ---<o:p></o:p></p>
<p class="MsoNormal">> > > tests/intel/xe_vm.c | 2 +-<o:p></o:p></p>
<p class="MsoNormal">> > > 1 file changed, 1 insertion(+), 1 deletion(-)<o:p></o:p></p>
<p class="MsoNormal">> > > > > diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c<o:p></o:p></p>
<p class="MsoNormal">> > > index 7a8740b69..e78ddd0e5 100644<o:p></o:p></p>
<p class="MsoNormal">> > > --- a/tests/intel/xe_vm.c<o:p></o:p></p>
<p class="MsoNormal">> > > +++ b/tests/intel/xe_vm.c<o:p></o:p></p>
<p class="MsoNormal">> > > @@ -957,7 +957,7 @@ test_bind_array(int fd, struct drm_xe_engine_class_instance *eci, int n_execs,<o:p></o:p></p>
<p class="MsoNormal">> > > xe_cork_end(&cork);<o:p></o:p></p>
<p class="MsoNormal">> > > xe_cork_wait_done(&cork);<o:p></o:p></p>
<p class="MsoNormal">> > > xe_cork_fini(&cork);<o:p></o:p></p>
<p class="MsoNormal">> > > - n_execs = n_execs / 2;<o:p></o:p></p>
<p class="MsoNormal">> > > + n_execs = n_execs / 4;<o:p></o:p></p>
<p class="MsoNormal">> > > }<o:p></o:p></p>
<p class="MsoNormal">> > > <o:p></o:p></p>
<p class="MsoNormal">> > > xe_vm_bind_array(fd, vm, bind_exec_queue, bind_ops, n_execs, sync, 1);<o:p></o:p></p>
<p class="MsoNormal">> > > -- <o:p></o:p></p>
<p class="MsoNormal">> > > 2.34.1 <o:p></o:p></p>
<p class="MsoNormal">> <o:p></o:p></p>
</div>
</body>
</html>