From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>,
Andi Shyti <andi.shyti@linux.intel.com>,
Nitin Gote <nitin.r.gote@intel.com>,
<intel-gfx@lists.freedesktop.org>, <chris.p.wilson@intel.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
<linux-media@vger.kernel.org>, <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] dma-buf: Take a breath during dma-fence-chain subtests
Date: Wed, 29 Oct 2025 16:17:36 -0400 [thread overview]
Message-ID: <aQJ2YMGxh-foBCvx@intel.com> (raw)
In-Reply-To: <cf5d530e-6952-4e76-93e2-5c72b31b5c62@amd.com>
On Wed, Aug 13, 2025 at 03:29:39PM +0200, Christian König wrote:
> On 13.08.25 14:43, Janusz Krzysztofik wrote:
> > Hi Christian,
> >
> > On Tuesday, 8 July 2025 12:09:58 CEST Christian König wrote:
> >> On 08.07.25 10:56, Janusz Krzysztofik wrote:
> >>>>
> >>>> There is no reason to test enabling signaling each of the element in a loop. So there should be something like 4096 calls to the dma_fence_chain_cb function each jumping to the next unsignaled fence and re-installing the callback.
> >>>
> >>> So how building a chain should look like in real use cases? When a user
> >>> builds a chained link of her fence with another fence then may she enable
> >>> signaling on the new chain link? If that other fence occurs a chain link then
> >>> who should take care of disabling signaling on it so signaling is enabled only
> >>> on the last link of the chain, not leading to a situation similar to what we
> >>> have now in the test case? IOW, what's a correct use pattern of
> >>> dma_fence_chain? I can't find that documented anywhere, neither in inline
> >>> docs nor in commit descriptions.
> >>
> >> The dma_fence_chain container is basically a single linked list which allows to "chain" together multiple dma_fence objects.
> >>
> >> The use cases is to keep only a single fence even when multiple asynchronous operations have been started.
> >>
> >> So you usually keep only the most recently created dma_fence_chain and eventually ask that one to signal when you need to wait for all fences inside the container.
> >>
> >> The tricky part is that since the chain can get very long the implementation can't use recursion or otherwise we would potentially overflow the kernel stack. And that needs to be tested and made sure we don't accidentally break the implementation somehow.
> >>
> >> Keeping all elements of a dma_fence_chain in an array and asking all of them to signal individually makes no sense, for this use case we have the dma_fence_array in the first place.
> >
> > I'm going to submit a patch that drops enabling of signaling on each link of
> > the tested chain, as you suggested. Don't you mind if I add your Suggested-
> > by:?
>
> Sure.
>
> Thanks for looking into that,
Hi Christian,
Okay, so the take is that that IGT case is non-realistic and that that kernel
change is not needed. We still have a problem with this patch here take so
long to complete in a few platforms in a way that the watchdogs gets triggered
and test case is marked as failure. While if we do the reschedule waiting a bit
longer it end up completing successfully as expected.
Since the goal here is not performance but compliance, can we go with this
cond_reschedule here? Or do you have any other suggestion here on how
to handle this test case and make it pass on those old platforms?
Or should we simply disable the tests for those platforms?
Thanks,
Rodrigo.
> Christian.
>
> >
> > Thanks,
> > Janusz
> >
> >>
> >> Regards,
> >> Christian.
> >>
> >>>
> >>> Thanks,
> >>> Janusz
> >>
> >
> >
> >
> >
>
next prev parent reply other threads:[~2025-10-29 20:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250226155534.1099538-1-nitin.r.gote@intel.com>
2025-02-27 12:52 ` [PATCH] dma-buf: Take a breath during dma-fence-chain subtests Andi Shyti
2025-02-27 14:11 ` Christian König
2025-02-28 5:12 ` Gote, Nitin R
2025-07-07 12:25 ` Janusz Krzysztofik
2025-07-07 13:14 ` Christian König
2025-07-08 8:56 ` Janusz Krzysztofik
2025-07-08 10:09 ` Christian König
2025-08-13 12:43 ` Janusz Krzysztofik
2025-08-13 13:29 ` Christian König
2025-10-29 20:17 ` Rodrigo Vivi [this message]
2025-10-30 10:50 ` Christian König
2025-10-30 13:20 ` Andi Shyti
2025-10-30 13:32 ` Christian König
2025-03-06 15:11 Nitin Gote
2025-03-06 14:54 ` Christian König
-- strict thread matches above, loose matches on Subject: below --
2025-03-18 10:34 Nitin Gote
2025-03-18 10:37 ` 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=aQJ2YMGxh-foBCvx@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=chris.p.wilson@intel.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=janusz.krzysztofik@linux.intel.com \
--cc=linux-media@vger.kernel.org \
--cc=nitin.r.gote@intel.com \
--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