Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Implement SINGLE_TIMELINE with a syncobj (v2)
Date: Wed, 24 Mar 2021 11:36:09 +0000	[thread overview]
Message-ID: <97de980a-8d19-aa0a-0598-628b9c874af2@linux.intel.com> (raw)
In-Reply-To: <YFsL1ZQ3pkOHXZ9B@phenom.ffwll.local>


On 24/03/2021 09:52, Daniel Vetter wrote:
> On Wed, Mar 24, 2021 at 09:28:58AM +0000, Tvrtko Ursulin wrote:
>>
>> On 23/03/2021 17:51, Jason Ekstrand wrote:
>>> This API is entirely unnecessary and I'd love to get rid of it.  If
>>> userspace wants a single timeline across multiple contexts, they can
>>> either use implicit synchronization or a syncobj, both of which existed
>>> at the time this feature landed.  The justification given at the time
>>> was that it would help GL drivers which are inherently single-timeline.
>>> However, neither of our GL drivers actually wanted the feature.  i965
>>> was already in maintenance mode at the time and iris uses syncobj for
>>> everything.
>>>
>>> Unfortunately, as much as I'd love to get rid of it, it is used by the
>>> media driver so we can't do that.  We can, however, do the next-best
>>> thing which is to embed a syncobj in the context and do exactly what
>>> we'd expect from userspace internally.  This isn't an entirely identical
>>> implementation because it's no longer atomic if userspace races with
>>> itself by calling execbuffer2 twice simultaneously from different
>>> threads.  It won't crash in that case; it just doesn't guarantee any
>>> ordering between those two submits.
>>>
>>> Moving SINGLE_TIMELINE to a syncobj emulation has a couple of technical
>>> advantages beyond mere annoyance.  One is that intel_timeline is no
>>> longer an api-visible object and can remain entirely an implementation
>>> detail.  This may be advantageous as we make scheduler changes going
>>> forward.  Second is that, together with deleting the CLONE_CONTEXT API,
>>> we should now have a 1:1 mapping between intel_context and
>>> intel_timeline which may help us reduce locking.
>>
>> Much, much better commit message although I still fail to understand where
>> do you see implementation details leaking out. So for me this is still
>> something I'd like to get to the bottom of.
>>
>> I would also mention the difference regarding fence context change.
>>
>> And in general I would maintain this patch as part of a series which ends up
>> demonstrating the "mays" and "shoulds".
> 
> I disagree. The past few years we've merged way too much patches and
> features without carefully answering the high level questions of
> - do we really need to solve this problem
> - and if so, are we really solving this problem in the right place
> 
> Now we're quite in a hole, and we're not going to get out of this hole if
> we keep applying the same standards that got us here. Anything that does
> not clearly and without reservation the above two questions with "yes"
> needs to be removed or walled off, just so we can eventually see which
> complexity we really need, and what is actually superflous.

I understand your general point but when I apply it to this specific 
patch, even if it is simple, it is neither removing the uapi or walling 
it off. So I see it as the usual review standard to ask to see what 
"mays" and "shoulds" actually get us in concrete terms.

I would be able to understand putting the uapi behind the "if gen > 12 
|| is_discrete EINVAL", or whatever, since it is fair game to deprecate 
for any new platform or say GuC submission.

Not doing simply that makes me worry there are still misunderstandings 
on what kind of problems were encountered with regards to 
intel_timeline, by work item this or work item that, and that there 
isn't still a confusion about what is the internal timeline object and 
what is the internal hwsp object. I feel there hasn't been full 
transparency on these technical issues which is why I think seeing the 
actual series which is supposed to build on top of this would be helpful.

I even worry that we still have a big disconnect on whether this flag is 
leaking any internal implementation details out to userspace. If the 
commit message was reworded without actual agreement that implementation 
details are not exposed we will continue disagreeing going forward, 
which is not a good start.

We exchanged so many emails on this but I don't feel we are getting 
anywhere so I really have no idea - obviously you will steamroll this in 
regardless so I don't think there is point to argue further.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-03-24 11:36 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 22:38 [Intel-gfx] [PATCH 0/4] drm/i915: uAPI clean-ups part 2 Jason Ekstrand
2021-03-19 22:38 ` [Intel-gfx] [PATCH 1/4] drm/i915: Drop I915_CONTEXT_PARAM_RINGSIZE Jason Ekstrand
2021-03-20 14:48   ` Jason Ekstrand
2021-03-22 10:52     ` Matthew Auld
2021-03-22 16:00       ` Jason Ekstrand
2021-03-22 12:01     ` Jani Nikula
2021-03-22 16:01       ` Jason Ekstrand
2021-03-22 16:26         ` Daniel Vetter
2021-03-19 22:38 ` [Intel-gfx] [PATCH 2/4] drm/i915: Drop I915_CONTEXT_PARAM_NO_ZEROMAP Jason Ekstrand
2021-03-22 13:00   ` [Intel-gfx] [drm/i915] 014c1518e8: assertion_failure kernel test robot
2021-03-19 22:38 ` [Intel-gfx] [PATCH 3/4] drm/i915: Drop the CONTEXT_CLONE API Jason Ekstrand
2021-03-22 11:22   ` Tvrtko Ursulin
2021-03-22 14:09     ` Daniel Vetter
2021-03-22 14:32       ` Tvrtko Ursulin
2021-03-22 14:57         ` Daniel Vetter
2021-03-22 15:31           ` Tvrtko Ursulin
2021-03-22 16:24             ` Jason Ekstrand
2021-03-23  9:46               ` Tvrtko Ursulin
2021-03-22 16:43             ` Daniel Vetter
2021-03-23  9:14               ` Tvrtko Ursulin
2021-03-23 13:23                 ` Daniel Vetter
2021-03-23 16:23                   ` Tvrtko Ursulin
2021-03-23 17:50                     ` Jason Ekstrand
2021-03-19 22:38 ` [Intel-gfx] [PATCH 4/4] drm/i915: Implement SINGLE_TIMELINE with a syncobj Jason Ekstrand
2021-03-22 12:28   ` Tvrtko Ursulin
2021-03-22 16:10     ` Jason Ekstrand
2021-03-23  9:35       ` Tvrtko Ursulin
2021-03-23 17:44         ` Jason Ekstrand
2021-03-22 16:59   ` Daniel Vetter
2021-03-22 19:12     ` Jason Ekstrand
2021-03-23 17:51   ` [Intel-gfx] [PATCH] drm/i915: Implement SINGLE_TIMELINE with a syncobj (v2) Jason Ekstrand
2021-03-24  9:28     ` Tvrtko Ursulin
2021-03-24  9:52       ` Daniel Vetter
2021-03-24 11:36         ` Tvrtko Ursulin [this message]
2021-03-24 17:18           ` Jason Ekstrand
2021-03-25  9:48             ` Tvrtko Ursulin
2021-03-25  9:54               ` Daniel Vetter
2021-03-24  9:46     ` Daniel Vetter
2021-03-25 21:13     ` Matthew Brost
2021-03-25 22:19       ` Jason Ekstrand
2021-03-25 22:21     ` [Intel-gfx] [PATCH 4/4] drm/i915: Implement SINGLE_TIMELINE with a syncobj (v3) Jason Ekstrand
2021-03-19 23:14 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: uAPI clean-ups part 2 Patchwork
2021-03-22 11:55   ` Jani Nikula
2021-03-22 16:11     ` Jason Ekstrand
2021-03-23 21:32 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: uAPI clean-ups part 2 (rev2) Patchwork
2021-03-26  3:01 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: uAPI clean-ups part 2 (rev3) Patchwork

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=97de980a-8d19-aa0a-0598-628b9c874af2@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-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