From: zhoucm1 <david1.zhou-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
<deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 00/13] shadow page table support
Date: Fri, 5 Aug 2016 17:12:57 +0800 [thread overview]
Message-ID: <57A45899.1060600@amd.com> (raw)
In-Reply-To: <99f20f60-11a2-9e79-728e-d7fe754d8b47-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
On 2016年08月05日 16:56, Christian König wrote:
> Am 05.08.2016 um 04:43 schrieb zhoucm1:
>>
>>
>> On 2016年08月04日 17:52, Christian König wrote:
>>> Am 04.08.2016 um 08:05 schrieb zhoucm1:
>>>>
>>>>
>>>> On 2016年08月03日 21:39, Christian König wrote:
>>>>> Doubling all the page table updates clearly doesn't sound like a
>>>>> good idea to me.
>>>> Could you tell me why it isn't a good idea?
>>>> I though the overhead is the least, and we don't need to sync
>>>> between bo and its shadow, aren't we?
>>>
>>> Yeah, but you also double the CPU overhead generating the update
>>> commands. And for large updates you need to backup the whole page
>>> table BO anyway, so the copy overhead between system memory and VRAM
>>> shouldn't matter so much.
>>>
>>> I would rather go into the direction that we switch shadow and real
>>> BO like we discussed previously.
>>>
>>> This way you would made all updates on the shadow first and then
>>> copy all changes page tables to their VRAM location after scheduling
>>> all the updates.
>> I have implemented your suggestion, and tested just now. The big
>> problem is coming, the performance dropped very much, from 68fps to
>> 50fps with heaven on Fiji.
>> The root cause is coping shadow bo to pt bo need to take pd
>> reservation, which kills your improvement of sync for vm page table
>> udpating.
>
> Mhm, that is indeed a bit problematic. I don't know of hand either how
> to fix this.
>
>>
>> I checked doubling update pt, which fps is 64.5fps, dropped 3.5fps
>> from 68fps.
>>
>> With thinking more, if we select doubling update, then updating
>> shadow jobs don't need to align with normal pt jobs, since shadow
>> jobs contain the content of updating, just let them run in alone
>> entity (shadow entity) with normal run_queue, after gpu reset, we
>> wait for all shadow jobs finished, and then recover page table from
>> shadow, this way, we will completely avoid the shadow jobs effect.
>>
>> What do you think of it?
>
> This way you need to enable the scheduler again before you can recover
> anything, which is clearly not such a good idea.
I just completed this solution, and it works very fine as well, there
isn't any performance dropped.
Whatever we select any of the three solutions, we cannot avoid to enable
scheduler, since recovery page table jobs have to use scheduler.
Should I send which solution patch to review?
Regards,
David Zhou
>
> Ok, let's do this with the double pt update for now. From your numbers
> that looks like the option with the least impact and we can work on
> that later on if we really find the double CPU overhead to be a problem.
>
> Regards,
> Christian.
>
>>
>> Regards,
>> David Zhou
>>
>>>
>>> Regards,
>>> Christian.
>>>
>>>>
>>>> Regards,
>>>> David Zhou
>>>
>>>
>>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2016-08-05 9:12 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 7:48 [PATCH 00/13] shadow page table support Chunming Zhou
[not found] ` <1470124147-22840-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2016-08-02 7:48 ` [PATCH 01/13] drm/amdgpu: irq resume should be immediately after gpu resume Chunming Zhou
2016-08-02 7:48 ` [PATCH 02/13] drm/amdgpu: add shadow bo support Chunming Zhou
2016-08-02 7:48 ` [PATCH 03/13] drm/amdgpu: set shadow flag for pd/pt bo Chunming Zhou
2016-08-02 7:48 ` [PATCH 04/13] drm/amdgpu: update shadow pt bo while update pt Chunming Zhou
2016-08-02 7:48 ` [PATCH 05/13] drm/amdgpu: update pd shadow while updating pd Chunming Zhou
2016-08-02 7:49 ` [PATCH 06/13] drm/amdgpu: implement amdgpu_vm_recover_page_table_from_shadow Chunming Zhou
2016-08-02 7:49 ` [PATCH 07/13] drm/amdgpu: link all vm clients Chunming Zhou
2016-08-02 7:49 ` [PATCH 08/13] drm/amdgpu: add vm_list_lock Chunming Zhou
2016-08-02 7:49 ` [PATCH 09/13] drm/amd: add block entity function Chunming Zhou
2016-08-02 7:49 ` [PATCH 10/13] drm/amdgpu: recover page tables after gpu reset Chunming Zhou
2016-08-02 7:49 ` [PATCH 11/13] drm/amd: wait neccessary dependency before running job Chunming Zhou
2016-08-02 7:49 ` [PATCH 12/13] drm/amdgpu: add vm recover pt fence Chunming Zhou
2016-08-02 7:49 ` [PATCH 13/13] drm/amdgpu: add backup condition for shadow page table Chunming Zhou
2016-08-03 13:39 ` [PATCH 00/13] shadow page table support Christian König
[not found] ` <28f9e53b-5616-89e1-202b-6dba62b7f004-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-08-04 6:05 ` zhoucm1
[not found] ` <57A2DB2C.7050705-5C7GfCeVMHo@public.gmane.org>
2016-08-04 9:52 ` Christian König
[not found] ` <88f96afd-c2c2-b4e5-8b79-e09f1bf7e742-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-08-05 2:43 ` zhoucm1
[not found] ` <57A3FD55.60602-5C7GfCeVMHo@public.gmane.org>
2016-08-05 8:56 ` Christian König
[not found] ` <99f20f60-11a2-9e79-728e-d7fe754d8b47-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-08-05 9:12 ` zhoucm1
[not found] ` <57A45883.6040901-5C7GfCeVMHo@public.gmane.org>
2016-08-05 9:21 ` Christian König
2016-08-05 9:12 ` zhoucm1 [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-28 10:11 Chunming Zhou
[not found] ` <1469700700-25013-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2016-08-02 2:03 ` zhoucm1
2016-07-25 7:22 Chunming Zhou
[not found] ` <1469431353-15787-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2016-07-25 10:31 ` Christian König
[not found] ` <b2f1e133-c7e2-88c4-1e0f-d12310d734f0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-07-26 2:40 ` zhoucm1
[not found] ` <5796CD94.6080405-5C7GfCeVMHo@public.gmane.org>
2016-07-26 5:33 ` zhoucm1
[not found] ` <5796F610.4050204-5C7GfCeVMHo@public.gmane.org>
2016-07-26 8:27 ` Christian König
[not found] ` <a53d1727-796b-351e-7254-e8eed6369f2d-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-07-26 8:41 ` zhoucm1
[not found] ` <57972255.7000307-5C7GfCeVMHo@public.gmane.org>
2016-07-26 9:05 ` Christian König
[not found] ` <3766450b-7dd5-9632-ed0b-81e744d08f32-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-07-26 9:12 ` zhoucm1
2016-07-26 8:51 ` Liu, Monk
2016-07-26 8:52 ` Liu, Monk
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=57A45899.1060600@amd.com \
--to=david1.zhou-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.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 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.