From: Philipp Stanner <phasta@mailbox.org>
To: "Christian König" <christian.koenig@amd.com>,
"Philipp Stanner" <phasta@kernel.org>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Simona Vetter" <simona.vetter@ffwll.ch>,
"Chris Wilson" <chris@chris-wilson.co.uk>,
"Danilo Krummrich" <dakr@kernel.org>,
"Gary Guo" <gary@garyguo.net>,
"Alice Ryhl" <aliceryhl@google.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
"Paul E . McKenney" <paulmck@kernel.org>,
"Yunxiang Li" <Yunxiang.Li@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>
Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/3] dma-buf: dma-fence: Add dma_fence_overwrite_timestamp()
Date: Fri, 20 Nov 2026 11:01:01 +0100 [thread overview]
Message-ID: <d53b0e41ca767a2acb1f6ee29344567f34385d8c.camel@mailbox.org> (raw)
In-Reply-To: <a8fe714b-6d26-4777-8b9c-4299ecdc3f44@amd.com>
On Fri, 2026-11-20 at 10:38 +0100, Christian König wrote:
> On 11/19/26 14:18, Philipp Stanner wrote:
> > A fence's timestamp is just an opportunistic data point for debugging
> > information etc. drm_sched, for example, uses the timestamps for its
> > scheduling algorithms.
> >
> > In rare situations it can make sense to allow users to overwrite a
> > timestamp with a more accurate value. This is relatively harmless since
> > the timestamp has no meaning for the implementation itself.
> >
> > Add dma_fence_overwrite_timestamp().
>
> I think that this is a very bad idea since it gives the impression
> that overwriting the timestamp on a fence is ok.
>
> That was only done on the scheduled dma-fence because nobody cares
> about that time in the uAPI. For all other cases that can blow up.
>
> I would rather come up with a clean approach for the scheduler to
> track the spend time per entity which would make that hack completely
> superfluous.
Yes, I agree.
The *one* feature we would have needed in C is a public-private system.
With structs in APIs it's often completely undefined what the user can
and cannot touch.
That led to API ossification. Just look at drm_sched, where we now
cannot trivially change API internals anymore because external parties
conveniently use this or that.
> IIRC Tvrtko already created patches for that, I'm just not sure if
> they were ever committed.
I suppose it should be somewhat easy to track that data in
drm_sched_fence.
Maybe Tvrtko can point me to his ideas so I can take a look.
Thx
P.
next prev parent reply other threads:[~2026-11-20 10:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 13:18 [PATCH 0/3] dma-fence: Fix timestamp memory ordering Philipp Stanner
2026-11-19 13:18 ` [PATCH 1/3] dma-buf/dma-fence: Ensure correct ordering in dma_fence_timestamp() Philipp Stanner
2026-11-20 9:33 ` Christian König
2026-11-19 13:18 ` [PATCH 2/3] dma-buf: dma-fence: Add dma_fence_overwrite_timestamp() Philipp Stanner
2026-11-20 9:38 ` Christian König
2026-11-20 10:01 ` Philipp Stanner [this message]
2026-11-19 13:18 ` [PATCH 3/3] drm/sched: Fix memory ordering with dma_fence_overwrite_timestamp() Philipp Stanner
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=d53b0e41ca767a2acb1f6ee29344567f34385d8c.camel@mailbox.org \
--to=phasta@mailbox.org \
--cc=Yunxiang.Li@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=aliceryhl@google.com \
--cc=chris@chris-wilson.co.uk \
--cc=christian.koenig@amd.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=paulmck@kernel.org \
--cc=phasta@kernel.org \
--cc=simona.vetter@ffwll.ch \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=tvrtko.ursulin@igalia.com \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®