From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object.
Date: Thu, 16 Sep 2021 16:05:54 +0100 [thread overview]
Message-ID: <36f7efd5-ec3c-629a-cd9d-e38f12370bbd@linux.intel.com> (raw)
In-Reply-To: <a7176659-b4a3-33dc-e2e2-4cecf28f7dbb@linux.intel.com>
On 16/09/2021 15:30, Tvrtko Ursulin wrote:
>
> On 16/09/2021 14:41, Maarten Lankhorst wrote:
>> Op 03-09-2021 om 12:48 schreef Tvrtko Ursulin:
>>>
>>> On 03/09/2021 10:31, Maarten Lankhorst wrote:
>>>> Op 31-08-2021 om 12:29 schreef Tvrtko Ursulin:
>>>>>
>>>>> On 31/08/2021 10:34, Maarten Lankhorst wrote:
>>>>>> Op 31-08-2021 om 11:18 schreef Tvrtko Ursulin:
>>>>>>>
>>>>>>> On 30/08/2021 13:09, Maarten Lankhorst wrote:
>>>>>>>> vma->obj and vma->resv are now never NULL, and some checks can
>>>>>>>> be removed.
>>>>>>>
>>>>>>> Is the direction here compatible with SVM / VM_BIND?
>>>>>>
>>>>>>
>>>>>> Yeah, it should be. The changes here make the obj->resv->lock the
>>>>>> main lock, so it should at least simplify locking for VM_BIND.
>>>>>
>>>>> Hm but what will vma->obj point to in case of SVM, when there is no
>>>>> GEM BO?
>>>>
>>>> Probably to one of the bo's in i915_vm, or a dummy bo that least
>>>> shares the vm_resv object, similar to the aliasing gtt handling.
>>>
>>> As a long term or short term solution? Worried that would waste a lot
>>> of SLAB space just for convenience (whole struct drm_i915_gem_object
>>> just to store a single pointer to a dma_resv object, if I got that
>>> right), while it should be possible to come up with a cleaner design.
>>>
>>> Even for the upcoming page granularity work we will need multiple
>>> VMAs point to single GEM bo in ppgtt and that, when SVM is
>>> considered, could for instance mean that VMAs should instead be
>>> backed by some new backing store objects, which in turn may (or may
>>> not) point to GEM BOs.
>>>
>>> Regards,
>>>
>>> Tvrtko
>>
>> We could revisit this if it's required for SVM, since we can always
>> optimize that code later, I don't think it's a problem to remove it
>> for now, especially since it's a lot easier if VMA becomes a pointer
>> to a memory slab for an object only, without its own lifetime rules. :)
>
> Not sure what you meant with "pointer to memory slab for an object"?
>
> But on the high level, what worries me is whether the direction is not
> wrong. Sure you can change it all again later, but if we are moving
> towards the world where VMAs are fundamentally and predominantly *not*
> backed by GEM buffer objects, then I have to ask the question whether
> this plan of rewriting everything twice is the most efficient one.
>
> Maybe its not that scary, not sure, but again, all I see is a large-ish
> series which implements some very important functionality, and _seems_
> to rely on what I think is a design direction incompatible with where I
> thought we needed to go.
>
> I suppose all I can do is ask you to verify this direction with Daniel.
> Maybe you already have but I did not see it in public at least. So
> adding him to CC.
Okay I reminded myself of how the SVM is implemented and perhaps it is
not a concern. It seems that it doesn't use the VMA for more than a
temporary vehicle during PTE setup stage.
And for page granularity paths over legacy binding I think it should
also be fine since, as you say, all VMAs can and should point to the
same obj.
Regards,
Tvrtko
next prev parent reply other threads:[~2021-09-16 15:05 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 12:09 [Intel-gfx] [PATCH 00/19] drm/i915: Short-term pinning and async eviction Maarten Lankhorst
2021-08-30 12:09 ` [Intel-gfx] [PATCH 01/19] drm/i915: Move __i915_gem_free_object to ttm_bo_destroy Maarten Lankhorst
2021-09-16 9:43 ` Thomas Hellström (Intel)
2021-09-16 13:35 ` Maarten Lankhorst
2021-08-30 12:09 ` [Intel-gfx] [PATCH 02/19] drm/i915: Remove unused bits of i915_vma/active api Maarten Lankhorst
2021-09-08 1:37 ` Niranjana Vishwanathapura
2021-08-30 12:09 ` [Intel-gfx] [PATCH 03/19] drm/i915: Slightly rework EXEC_OBJECT_CAPTURE handling Maarten Lankhorst
2021-09-08 1:49 ` Niranjana Vishwanathapura
2021-08-30 12:09 ` [Intel-gfx] [PATCH 04/19] drm/i915: Remove gen6_ppgtt_unpin_all Maarten Lankhorst
2021-09-29 8:07 ` Matthew Auld
2021-08-30 12:09 ` [Intel-gfx] [PATCH 05/19] drm/i915: Create a dummy object for gen6 ppgtt Maarten Lankhorst
2021-08-30 12:09 ` [Intel-gfx] [PATCH 06/19] drm/i915: Create a full object for mock_ring Maarten Lankhorst
2021-08-30 12:09 ` [Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object Maarten Lankhorst
2021-08-31 9:18 ` Tvrtko Ursulin
2021-08-31 9:34 ` Maarten Lankhorst
2021-08-31 10:29 ` Tvrtko Ursulin
2021-09-03 9:31 ` Maarten Lankhorst
2021-09-03 10:48 ` Tvrtko Ursulin
2021-09-16 13:41 ` Maarten Lankhorst
2021-09-16 14:30 ` Tvrtko Ursulin
2021-09-16 15:05 ` Tvrtko Ursulin [this message]
2021-08-30 12:09 ` [Intel-gfx] [PATCH 08/19] drm/i915: Fix runtime pm handling in i915_gem_shrink Maarten Lankhorst
2021-09-08 1:12 ` Niranjana Vishwanathapura
2021-09-29 8:37 ` Matthew Auld
2021-09-29 8:40 ` Matthew Auld
2021-09-29 8:53 ` Maarten Lankhorst
2021-08-30 12:09 ` [Intel-gfx] [PATCH 09/19] drm/i915: Change shrink ordering to use locking around unbinding Maarten Lankhorst
2021-09-08 1:04 ` Niranjana Vishwanathapura
2021-08-30 12:09 ` [Intel-gfx] [PATCH 10/19] Move CONTEXT_VALID_BIT check Maarten Lankhorst
2021-09-08 19:45 ` Niranjana Vishwanathapura
2021-08-30 12:09 ` [Intel-gfx] [PATCH 11/19] drm/i915: Remove resv from i915_vma Maarten Lankhorst
2021-09-08 1:10 ` Niranjana Vishwanathapura
2021-08-30 12:09 ` [Intel-gfx] [PATCH 12/19] drm/i915: Remove pages_mutex and intel_gtt->vma_ops.set/clear_pages members Maarten Lankhorst
2021-08-30 12:10 ` [Intel-gfx] [PATCH 13/19] drm/i915: Take object lock in i915_ggtt_pin if ww is not set Maarten Lankhorst
2021-09-08 3:11 ` Niranjana Vishwanathapura
2021-09-16 13:54 ` Maarten Lankhorst
2021-08-30 12:10 ` [Intel-gfx] [PATCH 14/19] drm/i915: Add i915_vma_unbind_unlocked, and take obj lock for i915_vma_unbind Maarten Lankhorst
2021-09-03 9:33 ` Maarten Lankhorst
2021-08-30 12:10 ` [Intel-gfx] [PATCH 15/19] drm/i915: Remove support for unlocked i915_vma unbind Maarten Lankhorst
2021-09-08 3:35 ` Niranjana Vishwanathapura
2021-08-30 12:10 ` [Intel-gfx] [PATCH 16/19] drm/i915: Remove short-term pins from execbuf Maarten Lankhorst
2021-08-30 12:10 ` [Intel-gfx] [PATCH 17/19] drm/i915: Add functions to set/get moving fence Maarten Lankhorst
2021-09-08 4:08 ` Niranjana Vishwanathapura
2021-09-16 13:49 ` Maarten Lankhorst
2021-09-16 9:48 ` Thomas Hellström
2021-08-30 12:10 ` [Intel-gfx] [PATCH 18/19] drm/i915: Add support for asynchronous moving fence waiting Maarten Lankhorst
2021-09-16 10:01 ` Thomas Hellström (Intel)
2021-08-30 12:10 ` [Intel-gfx] [PATCH 19/19] drm/i915: Add accelerated migration to ttm Maarten Lankhorst
2021-09-16 11:19 ` Thomas Hellström (Intel)
2021-08-30 13:03 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Short-term pinning and async eviction Patchwork
2021-08-30 13:05 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-08-30 13:32 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-09-16 9:40 ` [Intel-gfx] [PATCH 00/19] " Thomas Hellström (Intel)
2021-09-16 11:24 ` Maarten Lankhorst
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=36f7efd5-ec3c-629a-cd9d-e38f12370bbd@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
/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