From: Thomas Hellstrom <thellstrom@vmware.com>
To: Jerome Glisse <j.glisse@gmail.com>
Cc: Jerome Glisse <jglisse@redhat.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/ttm: pass buffer object for bind/unbind callback
Date: Sun, 20 Nov 2011 10:30:01 +0100 [thread overview]
Message-ID: <4EC8C899.7040104@vmware.com> (raw)
In-Reply-To: <CAH3drwZLuSgrdzP_Qa=uFQgutHik9aGpg6nm8p0p5LWaSSEiCg@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3131 bytes --]
On 11/19/2011 11:54 PM, Jerome Glisse wrote:
>
>> As mentioned previously, and in the discussion with Ben, the page tables
>> would not need to be rebuilt on each CS. They would be rebuilt only on the
>> first CS following a move_notify that caused a page table invalidation.
>>
>> move_notify:
>> if (is_incompatible(new_mem_type)) {
>> bo->page_tables_invalid = true;
>> invalidate_page_tables(bo);
>> }
>>
>> command_submission:
>> if (bo->page_tables_invalid) {
>> set_up_page_tables(bo);
>> bo->page_tables_invalid = false;
>> }
>>
> Why is it different from updating page table in move notify ? I don't
> see any bonus here, all the information we need are already available
> in move_notify.
>
>
I've iterated the pros of this approach at least two times before, but
for completeness let's do it again:
8<----------------------------------------------------------------------------------------------------
1) TTM doesn't need to care about the driver re-populating its GPU page
tables.
Since swapin is handled from the tt layer not the bo layer, this makes it a
bit easier on us.
2) Transition to page-faulted GPU virtual maps is straightforward and
consistent. A non-page-faulting driver sets up the maps at CS time, A
pagefaulting driver can set them up directly from an irq handler without
reserving, since the bo is properly fenced or pinned when the pagefault
happens.
3) A non-page-faulting driver knows at CS time exactly which
page-table-entries really do need populating, and can do this more
efficiently.
8<-----------------------------------------------------------------------------------------------------
And some extra items like partially populated TTMs that were mentioned
elsewhere.
>> Memory types in TTM are completely orthogonal to allowed GPU usage. The GPU
>> may access a bo if it's reserved, fenced or pinned, regardless of its
>> placement.
>>
>> A TT memory type is a *single* GPU aperture that may be mapped from the
>> aperture side by the CPU (AGP). It may also be used by a single unmappable
>> aperture that wants to use TTM's range management and eviction (vmwgfx GMR).
>> The driver can define more than one such memory type (psb), but a bo can
>> only be placed in one of those at a time, so this approach is unsuitable for
>> multiple apertures pointing to the same pages.
>>
> radeon virtual memory have a special address space, the system address
> space, it's managed by ttm through a TTM_TT (exact same code as
> current one). All the other address space are not managed by ttm but
> we require a bo to be bound to ttm_tt to be use, thought we can relax
> that. That's the reason why i consider system placement as different.
>
>
Yes for Radeon system memory may be different, and that's fine. But as
also previously mentioned we're trying to design a generic interface
here, in which we need to consider GPU- mappable system memory.
I think the pros of this interface design compared to populating in
bo_move are pretty well established, so can you please explain why you
keep arguing against it? What is it that I have missed?
/Thomas
[-- Attachment #1.2: Type: text/html, Size: 3797 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2011-11-20 9:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-17 22:20 [PATCH] drm/ttm: pass buffer object for bind/unbind callback j.glisse
2011-11-18 7:57 ` Thomas Hellstrom
2011-11-18 13:15 ` Ben Skeggs
2011-11-18 14:30 ` Thomas Hellstrom
2011-11-18 14:56 ` Jerome Glisse
2011-11-18 15:06 ` Thomas Hellstrom
2011-11-18 15:27 ` Jerome Glisse
2011-11-18 17:26 ` Ben Skeggs
2011-11-18 22:48 ` Thomas Hellstrom
2011-11-18 23:14 ` Jerome Glisse
2011-11-18 23:25 ` Jerome Glisse
2011-11-18 23:30 ` Jerome Glisse
2011-11-19 0:26 ` Ben Skeggs
2011-11-19 10:07 ` Thomas Hellstrom
2011-11-19 14:53 ` Ben Skeggs
2011-11-19 17:00 ` Thomas Hellstrom
2011-11-19 18:11 ` Jerome Glisse
2011-11-19 19:46 ` Thomas Hellstrom
2011-11-19 20:37 ` Jerome Glisse
2011-11-19 21:01 ` Thomas Hellstrom
2011-11-19 21:22 ` Jerome Glisse
2011-11-19 22:37 ` Thomas Hellstrom
2011-11-19 22:54 ` Jerome Glisse
2011-11-20 9:30 ` Thomas Hellstrom [this message]
2011-11-20 15:13 ` Jerome Glisse
2011-11-21 10:37 ` Thomas Hellstrom
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=4EC8C899.7040104@vmware.com \
--to=thellstrom@vmware.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=j.glisse@gmail.com \
--cc=jglisse@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.