From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: "Dave Airlie" <airlied@gmail.com>,
"Thomas Hellström (Intel)" <thomas_os@shipmail.org>
Cc: Danilo Krummrich <dakr@redhat.com>,
daniel@ffwll.ch, matthew.brost@intel.com,
sarah.walker@imgtec.com, donald.robson@imgtec.com,
boris.brezillon@collabora.com, christian.koenig@amd.com,
faith.ekstrand@collabora.com, bskeggs@redhat.com,
Liam.Howlett@oracle.com, nouveau@lists.freedesktop.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation
Date: Wed, 11 Oct 2023 10:22:20 +0200 [thread overview]
Message-ID: <925e4c2d15161ce8115409b6af97dab9a2996bf7.camel@linux.intel.com> (raw)
In-Reply-To: <CAPM=9tz3o-m+8VJJ6hxWhykat0kpp1UE7dBJE3X91aHHo1Y2VA@mail.gmail.com>
On Wed, 2023-10-11 at 06:23 +1000, Dave Airlie wrote:
> > I think we're then optimizing for different scenarios. Our compute
> > driver will use mostly external objects only, and if shared, I
> > don't
> > forsee them bound to many VMs. What saves us currently here is that
> > in
> > compute mode we only really traverse the extobj list after a
> > preempt
> > fence wait, or when a vm is using a new context for the first time.
> > So
> > vm's extobj list is pretty large. Each bo's vma list will typically
> > be
> > pretty small.
>
> Can I ask why we are optimising for this userspace, this seems
> incredibly broken.
First Judging from the discussion with Christian this is not really
uncommon. There *are* ways that we can play tricks in KMD of assorted
cleverness to reduce the extobj list size, but doing that in KMD that
wouldn't be much different than accepting a large extobj list size and
do what we can to reduce overhead of iterating over it.
Second the discussion here really was about whether we should be using
a lower level lock to allow for async state updates, with a rather
complex mechanism with weak reference counting and a requirement to
drop the locks within the loop to avoid locking inversion. If that were
a simplification with little or no overhead all fine, but IMO it's not
a simplification?
>
> We've has this sort of problem in the past with Intel letting the
> tail
> wag the horse, does anyone remember optimising relocations for a
> userspace that didn't actually need to use relocations?
>
> We need to ask why this userspace is doing this, can we get some
> pointers to it? compute driver should have no reason to use mostly
> external objects, the OpenCL and level0 APIs should be good enough to
> figure this out.
TBH for the compute UMD case, I'd be prepared to drop the *performance*
argument of fine-grained locking the extobj list since it's really only
traversed on new contexts and preemption. But as Christian mentions
there might be other cases. We should perhaps figure those out and
document?
/Thoams
>
> Dave.
next prev parent reply other threads:[~2023-10-11 8:22 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-20 21:53 [PATCH drm-misc-next 0/3] [RFC] DRM GPUVA Manager GPU-VM features Danilo Krummrich
2023-08-20 21:53 ` [PATCH drm-misc-next 1/3] drm: drm_exec: build always builtin Danilo Krummrich
2023-08-21 9:49 ` Christian König
2023-08-21 19:14 ` Danilo Krummrich
2023-08-20 21:53 ` [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation Danilo Krummrich
2023-08-22 1:31 ` kernel test robot
2023-08-22 2:18 ` kernel test robot
2023-08-22 3:01 ` kernel test robot
2023-08-30 7:27 ` Thomas Hellström (Intel)
2023-08-30 12:49 ` Danilo Krummrich
2023-08-30 13:42 ` Thomas Hellström (Intel)
2023-08-30 15:00 ` Danilo Krummrich
2023-08-31 9:04 ` Thomas Hellström (Intel)
2023-08-31 11:18 ` Danilo Krummrich
2023-08-31 16:53 ` Thomas Hellström (Intel)
2023-08-31 17:23 ` Thomas Hellström
2023-08-31 19:07 ` Danilo Krummrich
2023-09-01 5:59 ` Thomas Hellström (Intel)
2023-09-01 12:10 ` Danilo Krummrich
2023-09-06 14:20 ` Danilo Krummrich
2023-10-10 20:23 ` Dave Airlie
2023-10-11 7:07 ` Christian König
2023-10-12 10:33 ` Dave Airlie
2023-10-12 12:35 ` Christian König
2023-10-12 13:15 ` Daniel Vetter
2023-10-13 5:19 ` Christoph Hellwig
2023-10-11 8:22 ` Thomas Hellström [this message]
2023-08-30 7:48 ` Christian König
2023-08-30 13:05 ` Danilo Krummrich
2023-08-20 21:53 ` [PATCH drm-misc-next 3/3] drm/nouveau: gpuva mgr dma-resv/extobj handling, " Danilo Krummrich
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=925e4c2d15161ce8115409b6af97dab9a2996bf7.camel@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=dakr@redhat.com \
--cc=daniel@ffwll.ch \
--cc=donald.robson@imgtec.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=faith.ekstrand@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.brost@intel.com \
--cc=nouveau@lists.freedesktop.org \
--cc=sarah.walker@imgtec.com \
--cc=thomas_os@shipmail.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