linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Jason Ekstrand <jason@jlekstrand.net>
Cc: "Bas Nieuwenhuizen" <bas@basnieuwenhuizen.nl>,
	"Dave Airlie" <airlied@redhat.com>,
	"Jesse Hall" <jessehall@google.com>,
	"James Jones" <jajones@nvidia.com>,
	"Daniel Stone" <daniels@collabora.com>,
	"Kristian Høgsberg" <hoegsberg@google.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Chenbo Feng" <fengc@google.com>,
	"Greg Hackmann" <ghackmann@google.com>,
	linux-media@vger.kernel.org,
	"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
	linaro-mm-sig@lists.linaro.org,
	LKML <linux-kernel@vger.kernel.org>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] RFC: dma-buf: Add an API for importing and exporting sync files
Date: Mon, 9 Mar 2020 17:21:19 +0100	[thread overview]
Message-ID: <203505dc-7b75-1135-587e-cc6e88ade8cd@amd.com> (raw)
In-Reply-To: <CAOFGe94gv9N+6n6oEC2aRtsmy7kBfx1D_R6WLQSGq7-8yUM_OQ@mail.gmail.com>

Am 05.03.20 um 16:54 schrieb Jason Ekstrand:
> On Thu, Mar 5, 2020 at 7:06 AM Christian König <christian.koenig@amd.com> wrote:
>> [SNIP]
>> Well as far as I can see this won't work because it would break the
>> semantics of the timeline sync.
> I'm not 100% convinced it has to.  We already have support for the
> seqno regressing and we ensure that we still wait for all the fences.
> I thought maybe we could use that but I haven't spent enough time
> looking at the details to be sure.  I may be missing something.

That won't work. The seqno regression works by punishing userspace for 
doing something stupid and undefined.

Be we can't do that under normal circumstances.

>> I can prototype that if you want, shouldn't be more than a few hours of
>> hacking anyway.
> If you'd like to, go for it.  I'd be happy to give it a go as well but
> if you already know what you want, it may be easier for you to just
> write the patch for the cursor.

Send you two patches for that a few minutes ago. But keep in mind that 
those are completely untested.

> Two more questions:
>
>   1. Do you want this collapsing to happen every time we create a
> dma_fence_array or should it be a special entrypoint?  Collapsing all
> the time likely means doing extra array calculations instead of the
> dma_fence_array taking ownership of the array that's passed in.  My
> gut says that cost is ok; but my gut doesn't spend much time in kernel
> space.

In my prototype implementation that is a dma_resv function you call and 
get either a single fence or a dma_fence_array with the collapsed fences 
in return.

But I wouldn't add that to the general dma_fence_array_init function 
since this is still a rather special case. Well see the patches, they 
should be pretty self explaining.

>   2. When we do the collapsing, should we call dma_fence_is_signaled()
> to avoid adding signaled fences to the array?  It seems like avoiding
> adding references to fences that are already signaled would let the
> kernel clean them up faster and reduce the likelihood that a fence
> will hang around forever because it keeps getting added to arrays with
> other unsignaled fences.

I think so. Can't think of a good reason why we would want to add 
already signaled fences to the array.

Christian.

>
> --Jason


  reply	other threads:[~2020-03-09 16:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 23:58 [PATCH] RFC: dma-buf: Add an API for importing and exporting sync files Jason Ekstrand
2020-02-26  9:16 ` Christian König
2020-02-26 10:05   ` Daniel Vetter
2020-02-26 15:28     ` Jason Ekstrand
2020-02-26 16:46       ` Bas Nieuwenhuizen
2020-02-27  8:28         ` Christian König
2020-03-03 19:10           ` Jason Ekstrand
2020-03-04  8:34             ` Christian König
2020-03-04 16:27               ` Jason Ekstrand
2020-03-04 16:41                 ` Jason Ekstrand
2020-03-05 13:06                   ` Christian König
2020-03-05 15:54                     ` Jason Ekstrand
2020-03-09 16:21                       ` Christian König [this message]
2020-03-11  3:43                         ` Jason Ekstrand
2020-02-26 18:09 ` [PATCH] RFC: dma-buf: Add an API for importing and exporting sync files (v2) Jason Ekstrand
2020-03-03 19:03   ` [PATCH] RFC: dma-buf: Add an API for importing and exporting sync files (v3) Jason Ekstrand
2020-03-03 19:05     ` Jason Ekstrand
2020-03-11  3:43     ` [PATCH 1/3] dma-buf: add dma_fence_array_for_each (v2) Jason Ekstrand
2020-03-11  3:43       ` Jason Ekstrand
2020-03-11  3:43       ` [PATCH 2/3] dma-buf: add dma_resv_get_singleton (v2) Jason Ekstrand
2020-03-11  3:43         ` Jason Ekstrand
2020-03-11  3:43       ` [PATCH 3/3] RFC: dma-buf: Add an API for importing and exporting sync files (v4) Jason Ekstrand
2020-03-11  3:43         ` Jason Ekstrand
2020-03-11 13:18         ` Christian König
2020-03-12 15:57           ` Jason Ekstrand
2020-03-13 10:33             ` Christian König
2020-03-17 21:21         ` [PATCH 3/3] RFC: dma-buf: Add an API for importing and exporting sync files (v5) Jason Ekstrand
2020-09-30  9:39           ` Michel Dänzer
2020-09-30  9:55             ` Daniel Vetter
2021-03-15 21:11               ` Jason Ekstrand
2021-03-15 21:30                 ` Daniel Vetter

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=203505dc-7b75-1135-587e-cc6e88ade8cd@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@redhat.com \
    --cc=bas@basnieuwenhuizen.nl \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fengc@google.com \
    --cc=ghackmann@google.com \
    --cc=hoegsberg@google.com \
    --cc=jajones@nvidia.com \
    --cc=jason@jlekstrand.net \
    --cc=jessehall@google.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.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;
as well as URLs for NNTP newsgroup(s).