Hi, Oak.

On 1/4/22 00:08, Zeng, Oak wrote:

Regards,
Oak

Looks like your emails always start with "Regards, Oak". a misconfiguration?


-----Original Message-----
From: Thomas Hellström <thomas.hellst...@linux.intel.com>
Sent: January 3, 2022 1:58 PM
To: Zeng, Oak <oak.z...@intel.com>; intel-...@lists.freedesktop.org; 
dri-devel@lists.freedesktop.org
Cc: Auld, Matthew <matthew.a...@intel.com>
Subject: Re: [Intel-gfx] [PATCH v4 2/4] drm/i915: Use the vma resource as 
argument for gtt binding / unbinding

Hi, Oak.

On 1/3/22 19:17, Zeng, Oak wrote:
Regards,
Oak

-----Original Message-----
From: Intel-gfx <intel-gfx-boun...@lists.freedesktop.org> On Behalf Of Thomas 
Hellström
Sent: January 3, 2022 7:00 AM
To: intel-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org
Cc: Thomas Hellström <thomas.hellst...@linux.intel.com>; Auld, Matthew 
<matthew.a...@intel.com>
Subject: [Intel-gfx] [PATCH v4 2/4] drm/i915: Use the vma resource as argument 
for gtt binding / unbinding

When introducing asynchronous unbinding, the vma itself may no longer
be alive when the actual binding or unbinding takes place.
Can we take an extra reference counter of the vma to keep the vma alive, until 
the actual binding/unbinding takes place?
The point here is that that's not needed, and should be avoided.
Can you explain more why "keeping vma alive until unbinding takes place" should 
be avoided?

As I understand it, your series introduce asynchronized unbinding. But since 
vma might be no longer alive at the time of unbinding. To overcome this 
difficulty, you introduce a vma resource structure and you guarantee vma 
resource is alive at bind/unbind time. So you can use vma resource for the 
bind/unbind operation. My question is, can we achieve the asynchronized 
unbinding still using vma structure by keeping vma structure alive ( by ref 
count it). This way the change should be much smaller (compared to this 
series). Why it is harmful to keep the vma alive? Maybe you have other reasons 
to introduce vma resource that I don't see.

When we allow asynchronous unbinding, it's allowed to immediately rebind the vma, possibly into the same gpu virtual address, but with different pages. And when doing that we don't want to block waiting for the unbind to execute. In fact, we could allow a large number of outstanding binds and unbinds for a vma, which makes the vma structure unsuitable to track this, since there will no longer be a single mapping between a set of active pages and a vma, or a virtual gpu range and a vma.

Thanks,

/Thomas


Regards,
Oak

  If the
vma is no longer alive, that means nobody uses it anymore, but the GPU
may still have work in the pipe that references the GPU virtual address.

/Thomas.

Reply via email to