dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
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: Mon, 21 Nov 2011 11:37:26 +0100	[thread overview]
Message-ID: <4ECA29E6.4070706@vmware.com> (raw)
In-Reply-To: <CAH3drwbTUJNCuPiL=DgxJNnd6rEBZ1OHdidkFrRue83EThp8LA@mail.gmail.com>

On 11/20/2011 04:13 PM, Jerome Glisse wrote:
> On Sun, Nov 20, 2011 at 4:30 AM, Thomas Hellstrom<thellstrom@vmware.com>  wrote:
>    
>> 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.
>>      
> If done in move_notify i don't see why 1 would be different or 2.

Because to make the interface complete we need to support SYSTEM memory, 
and call move_notify from swapin, which I am not prepared to do.

>   I
> agree that in some case 3 is true. Given when move notify is call the
> ttm_tt is always fully populated at that point (only exception is in
> destroy path but it's a special on its own). If driver populate in
> move_notify is doesn't change anything from ttm pov.
>    

Then you put a restriction on TTM to *always* have populated TTMs which 
I am also not prepared to accept. It's been recently added as a 
performance optimization.

I won't spend any more time on this completely stupid argument. I've 
been asking you to make a minor change in order to get a complete and 
clean interface, and to get people to do the right thing in the future. 
You're obviously unwilling to do that.


/Thomas

      reply	other threads:[~2011-11-21 10:40 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
2011-11-20 15:13                                   ` Jerome Glisse
2011-11-21 10:37                                     ` Thomas Hellstrom [this message]

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=4ECA29E6.4070706@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox