From: "Christian König" <christian.koenig@amd.com>
To: "Patel, Mihir" <Mihir.Patel@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Chauhan, Madhav" <Madhav.Chauhan@amd.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Kamliya, Prakash" <Prakash.Kamliya@amd.com>,
"Surampalli, Kishore" <Kishore.Surampalli@amd.com>
Subject: Re: [PATCH v3] drm/amdgpu: Add debugfs entry for printing VM info
Date: Mon, 12 Oct 2020 12:54:11 +0200 [thread overview]
Message-ID: <3d9496e3-74ec-288d-4736-eb583d0f1c92@amd.com> (raw)
In-Reply-To: <24df1d90-04ad-e444-306d-7c2e16979b80@amd.com>
Am 12.10.20 um 12:50 schrieb Christian König:
> Am 12.10.20 um 12:00 schrieb Patel, Mihir:
>> [AMD Official Use Only - Internal Distribution Only]
>>
>>
>>
>> -----Original Message-----
>> From: Koenig, Christian <Christian.Koenig@amd.com>
>> Sent: Monday, October 12, 2020 3:14 PM
>> To: Patel, Mihir <Mihir.Patel@amd.com>; amd-gfx@lists.freedesktop.org
>> Cc: Chauhan, Madhav <Madhav.Chauhan@amd.com>; Deucher, Alexander
>> <Alexander.Deucher@amd.com>; Surampalli, Kishore
>> <Kishore.Surampalli@amd.com>; Kamliya, Prakash <Prakash.Kamliya@amd.com>
>> Subject: Re: [PATCH v3] drm/amdgpu: Add debugfs entry for printing VM
>> info
>>
>> [SNIP]
>>> Hi Christian,
>>> One question regarding getting total allocations by app and also
>>> swapped size for the app.
>>> Shouldn’t we print mapped entries as well to get total allocation by
>>> the process ?
>>> Also which list would represent swapped memory?
>> None, we don't really have that information anywhere since we don't
>> really have a swapped state.
>>
>> See when the application allocates a BO in VRAM the kernel driver is
>> free to swap it out to GTT and still do command submission. Only when
>> it is further swapped out to the CPU domain it is not accessible any
>> more.
>>
>> So what you can do is to look at the BOs in the CPU domain, but this
>> only gives you a certain hint on what's going on.
>>
>> Regards,
>> Christian.
>>
>> Thanks Christian for clarifying about swapped memory. How about total
>> allocated size? Can't we print mapped BOs since amdgpu_gem_info is
>> FILE/gem handle based?
>
> That's what you are already printing. E.g. if you sum up all the BOs
> in all the different states then you have the total amount of
> allocated memory for this process.
>
> Even if some of that memory isn't mapped into the VM.
Thinking a bit more about it, when you also look at
bo->preferred_domains and compare that with the current domain you can
also figure out if a BO is swapped out or not.
Christian.
>
> Christian.
>
>> Regards,
>> Mihir
>>> Thanks,
>>> Mihir
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-10-12 10:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 9:01 [PATCH v3] drm/amdgpu: Add debugfs entry for printing VM info Mihir Patel
2020-10-12 9:10 ` Christian König
2020-10-12 9:37 ` Patel, Mihir
2020-10-12 9:44 ` Christian König
2020-10-12 10:00 ` Patel, Mihir
2020-10-12 10:50 ` Christian König
2020-10-12 10:54 ` Christian König [this message]
2020-10-12 11:51 ` Patel, Mihir
2020-10-13 12:19 ` Chauhan, Madhav
2020-10-13 17:04 ` Christian König
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=3d9496e3-74ec-288d-4736-eb583d0f1c92@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Kishore.Surampalli@amd.com \
--cc=Madhav.Chauhan@amd.com \
--cc=Mihir.Patel@amd.com \
--cc=Prakash.Kamliya@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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