<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Am 04.01.23 um 00:08 schrieb Marek Olšák:<br>
<blockquote type="cite"
cite="mid:CAAxE2A69e+rHQJP+wHYOxywB0+B4Vp4XsO429euoGE=H-VRsPw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>I see about the access now, but did you even look at the
patch?</div>
</div>
</blockquote>
<br>
I did look at the patch, but I haven't fully understood yet what you
are trying to do here.<br>
<br>
<blockquote type="cite"
cite="mid:CAAxE2A69e+rHQJP+wHYOxywB0+B4Vp4XsO429euoGE=H-VRsPw@mail.gmail.com">
<div dir="ltr">
<div> Because what the patch does isn't even exposed to common
drm code, such as the preferred domain and visible VRAM
placement, so it can't be in fdinfo right now.<br>
</div>
<div><br>
</div>
<div>Or do you even know what fdinfo contains? Because it
contains nothing useful. It only has VRAM and GTT usage, which
we already have in the INFO ioctl, so it has nothing that we
need. We mainly need the eviction information and visible VRAM
information now. Everything else is a bonus.<br>
</div>
</div>
</blockquote>
<br>
Well the main question is what are you trying to get from that
information? The eviction list for example is completely meaningless
to userspace, that stuff is only temporary and will be cleared on
the next CS again.<br>
<br>
What we could expose is the VRAM over-commit value, e.g. how much
BOs which where supposed to be in VRAM are in GTT now. I think
that's what you are looking for here, right?<br>
<br>
<blockquote type="cite"
cite="mid:CAAxE2A69e+rHQJP+wHYOxywB0+B4Vp4XsO429euoGE=H-VRsPw@mail.gmail.com">
<div dir="ltr">
<div>
<div>Also, it's undesirable to open and parse a text file if
we can just call an ioctl.</div>
</div>
</div>
</blockquote>
<br>
Well I see the reasoning for that, but I also see why other drivers
do a lot of the stuff we have as IOCTL as separate files in sysfs,
fdinfo or debugfs.<br>
<br>
Especially repeating all the static information which were already
available under sysfs in the INFO IOCTL was a design mistake as far
as I can see. Just compare what AMDGPU and the KFD code is doing to
what for example i915 is doing.<br>
<br>
Same for things like debug information about a process. The fdinfo
stuff can be queried from external tools (gdb, gputop, umr etc...)
as well which makes that interface more preferred.<br>
<br>
<blockquote type="cite"
cite="mid:CAAxE2A69e+rHQJP+wHYOxywB0+B4Vp4XsO429euoGE=H-VRsPw@mail.gmail.com">
<div dir="ltr">
<div>
<div><br>
</div>
<div>So do you want me to move it into amdgpu_vm.c? Because
you could have just said: Let's move it into amdgpu_vm.c. :)<br>
</div>
<div><br>
</div>
<div>Thanks,<br>
</div>
<div>Marek<br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jan 3, 2023 at 3:33 AM
Christian König <<a
href="mailto:ckoenig.leichtzumerken@gmail.com"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">ckoenig.leichtzumerken@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> Take a look at /proc/self/fdinfo/$fd.<br>
<br>
The Intel guys made that vendor agnostic and are using it
within their IGT gpu top tool.<br>
<br>
Christian.<br>
<br>
<div>Am 02.01.23 um 18:57 schrieb Marek Olšák:<br>
</div>
<blockquote type="cite">
<div dir="auto">What are you talking about? Is fdinfo in
sysfs? Userspace drivers can't access sysfs.
<div dir="auto"><br>
</div>
<div dir="auto">Marek</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jan 2, 2023,
10:56 Christian König <<a
href="mailto:ckoenig.leichtzumerken@gmail.com"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">ckoenig.leichtzumerken@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div> Well first of all don't mess with the VM
internals outside of the VM code.<br>
<br>
Then why would we want to expose this through the
IOCTL interface? We already have this in the fdinfo.<br>
<br>
Christian.<br>
<br>
<div>Am 30.12.22 um 23:07 schrieb Marek Olšák:<br>
</div>
<blockquote type="cite">
<div dir="ltr">To give userspace a detailed view
about its GPU memory usage and evictions.<br>
This will help performance investigations.<br>
<br>
<div>Signed-off-by: Marek Olšák <<a
href="mailto:marek.olsak@amd.com"
rel="noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">marek.olsak@amd.com</a>></div>
<div><br>
</div>
<div>The patch is attached.</div>
<div><br>
</div>
<div>Marek<br>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>