From: Keith Packard <keithp@keithp.com>
To: "Thomas Hellström" <thomas@tungstengraphics.com>
Cc: keithp@keithp.com, Eric Anholt <eric@anholt.net>,
dri-devel@lists.sourceforge.net, Dave Airlie <airlied@gmail.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [RFC] [PATCH] DRM TTM Memory Manager patch
Date: Fri, 04 May 2007 08:15:02 -0700 [thread overview]
Message-ID: <1178291702.27028.30.camel@neko.keithp.com> (raw)
In-Reply-To: <463AE9AE.7070806@tungstengraphics.com>
[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]
On Fri, 2007-05-04 at 10:07 +0200, Thomas Hellström wrote:
>
> It's rare to have two clients access the same buffer at the same time.
> In what situation will this occur?
Right, what I'm trying to avoid is having any contention for
applications *not* sharing the same objects.
If there is any locking for mapping, we can either attempt to define a
locking order, or we can have a single global lock. The former leaves us
prone to deadlocks, the latter eliminates the ability for un-contended
parallel access.
> * It will encourage different DRI clients to simultaneously access
> the same buffer.
Sure. Separate 'DRI' from 'GL' and this may be a sensible plan. If you
want to prevent this *that's not DRI's problem*.
> * Inter-client and GPU data coherence can be guaranteed if we issue
> a mb() / write-combining flush with the unmap operation (which,
> BTW, I'm not sure is done today). Otherwise it is up to the
> clients, and very easy to forget.
CPU-GPU coherence is ensured by the mutual exclusion between mapping and
submitting. You may either have data available to the CPU or to the GPU.
I think that's a basic requirement for any solution in this space.
Keying the submit and map as to whether writing will occur means that
appropriate flushing and fencing can be automatically applied within the
kernel.
> OTOH, letting DRM resolve the deadlock by unmapping and remapping shared
> buffers in the correct order might not be the best one either. It will
> certainly mean some CPU overhead and what if we have to do the same with
> buffer validation? (Yes for some operations with thousands and thousands
> of relocations, the user space validation might need to stay).
I do not want to do relocations in user space. I don't see why doing
thousands of these requires moving this operation out of the kernel.
--
keith.packard@intel.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-05-04 15:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 6:55 Dave Airlie
2007-04-27 16:39 ` Greg KH
2007-04-30 23:10 ` Dave Airlie
2007-04-30 23:50 ` Dave Jones
2007-05-01 0:10 ` Thomas Hellström
2007-05-01 22:36 ` Ingo Oeser
2007-05-02 3:59 ` Greg KH
2007-05-02 20:21 ` Eric Anholt
2007-05-02 23:01 ` Thomas Hellström
2007-05-04 4:07 ` Keith Packard
2007-05-04 8:07 ` Thomas Hellström
2007-05-04 8:49 ` Jerome Glisse
2007-05-04 9:40 ` Jerome Glisse
2007-05-04 15:28 ` Keith Packard
2007-05-04 11:03 ` Thomas Hellström
2007-05-04 11:57 ` Jerome Glisse
2007-05-04 12:32 ` Thomas Hellström
2007-05-04 12:52 ` Jerome Glisse
2007-05-04 15:32 ` Keith Packard
2007-05-04 15:15 ` Keith Packard [this message]
2007-05-04 15:57 ` Keith Whitwell
2007-05-04 16:26 ` Keith Packard
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=1178291702.27028.30.camel@neko.keithp.com \
--to=keithp@keithp.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.sourceforge.net \
--cc=eric@anholt.net \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas@tungstengraphics.com \
/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
Powered by JetHome