From: Keith Whitwell <keith@tungstengraphics.com>
To: Keith Packard <keithp@keithp.com>
Cc: "Thomas Hellström" <thomas@tungstengraphics.com>,
"Linux Kernel" <linux-kernel@vger.kernel.org>,
"Jesse Barnes" <jbarnes@virtuousgeek.org>,
dri-devel@lists.sourceforge.net,
"Dave Airlie" <airlied@gmail.com>
Subject: Re: [RFC] [PATCH] DRM TTM Memory Manager patch
Date: Fri, 04 May 2007 16:57:55 +0100 [thread overview]
Message-ID: <463B5803.6050802@tungstengraphics.com> (raw)
In-Reply-To: <1178291702.27028.30.camel@neko.keithp.com>
Keith Packard wrote:
>> 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.
Agreed. The original conception for this was to have valdiation plus
relocations be a single operation, and by implication in the kernel.
Although the code as it stands doesn't do this, I think that should
still be the approach.
The issue with thousands of relocations from my point of view isn't a
problem - that's just a matter of getting appropriate data structures in
place.
Where things get a bit more interesting is with hardware where you are
required to submit a whole scene's worth of rendering before the
hardware will kick off, and with the expectation that the texture
placement will remain unchanged throughout the scene. This is a very
easy way to hit any upper limit on texture memory - the agp aperture
size in the case of integrated chipsets.
That's a special case of a the general problem of what do you do when a
client submits any validation list that can't be satisfied. Failing to
render isn't really an option, either the client or the memory manager
has to either prevent it happening in the first place or have some
mechanism for chopping up the dma buffer into segments which are
satisfiable... Neither of which I can see an absolutely reliable way to
do.
I think that any memory manager we can propose will have flaws of some
sort - either it is prone to failures that aren't really allowed by the
API, is excessively complex or somewhat pessimistic. We've chosen a
design that is simple, optimistic, but can potentially say "no"
unexpectedly. It would then be up to the client to somehow pick up the
pieces & potentially submit a smaller list. So far we just haven't
touched on how that might work.
The way to get around this is to mandate that hardware supports paged
virtual memory... But that seems to be a difficult trick.
Keith
next prev parent reply other threads:[~2007-05-04 16:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 6:55 [RFC] [PATCH] DRM TTM Memory Manager patch 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
2007-05-04 15:57 ` Keith Whitwell [this message]
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=463B5803.6050802@tungstengraphics.com \
--to=keith@tungstengraphics.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.sourceforge.net \
--cc=jbarnes@virtuousgeek.org \
--cc=keithp@keithp.com \
--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