All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Olšák" <maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Cc: amd-gfx mailing list
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: Plan: BO move throttling for visible VRAM evictions
Date: Mon, 15 May 2017 12:11:58 +0200	[thread overview]
Message-ID: <CAAxE2A4ex4e-5ShqesZ8oXJj1CnmH6Enhvu4fXs9kDKu9NHeiQ@mail.gmail.com> (raw)
In-Reply-To: <a5a8428e-444a-34b9-7fa9-60e77582819a-otUistvHUpPR7s880joybQ@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 4190 bytes --]

On May 15, 2017 4:29 AM, "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org> wrote:

On 14/05/17 06:31 AM, Marek Olšák wrote:
> On Mon, Apr 17, 2017 at 11:55 AM, Michel Dänzer <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
wrote:
>> On 17/04/17 07:58 AM, Marek Olšák wrote:
>>> On Fri, Apr 14, 2017 at 12:14 PM, Michel Dänzer <michel-otUistvHUpNNg+MwTxZMZA@public.gmane.orgt>
wrote:
>>>> On 04/04/17 05:11 AM, Marek Olšák wrote:
>>>>> On Fri, Mar 31, 2017 at 5:24 AM, Michel Dänzer <michel@daenzer.net>
wrote:
>>>>>> On 30/03/17 07:03 PM, Michel Dänzer wrote:
>>>>>>> On 25/03/17 01:33 AM, Marek Olšák wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm sharing this idea here, because it's something that has been
>>>>>>>> decreasing our performance a lot recently, for example:
>>>>>>>> http://openbenchmarking.org/prospect/1703011-RI-RADEONDIR06/
7b7668cfc109d1c3dc27e871c8aea71ca13f23fa
>>>>>>>
>>>>>>> The attached proof-of-concept patch (on top of Christian's "CPU
mapping
>>>>>>> of split VRAM buffers" series, ported from radeon) results in
145.05 fps
>>>>>>> on my Tonga.
>>>>>>
>>>>>> I get the same result without my or Christian's patches though, with
>>>>>> 4.11 based DRM or amd-staging-4.9. So I guess I just can't reproduce
the
>>>>>> problem with this test. Are there any other tests for it?
>>>>>
>>>>> It's random. Sometimes the benchmark runs OK, other times it's slow.
>>>>> You can easily see the difference but observing how smooth it is. The
>>>>> visible VRAM evictions result in constant 100-200ms stalls but not
>>>>> every frame, which feels like the frame rate is much lower than it
>>>>> actually is.
>>>>>
>>>>> Make sure your graphics details are maxed out. The best score I can
>>>>> get with my rig is 70 fps. (Fiji & Core i5 3570)
>>>>
>>>> I'm getting around 53-54 fps at Ultra with Tonga, both with Mesa 13.0.6
>>>> and Git.
>>>>
>>>> Have you tried if Christian's patches for CPU access to split VRAM
>>>> buffers help? I can imagine that forcing contiguous VRAM buffers for
CPU
>>>> access could cause lots of other BOs to be unnecessarily evicted from
>>>> VRAM, if at least one of their fragments happens to be in the CPU
>>>> visible part of VRAM.
>>>
>>> I've finally tested latest amd-staging-4.9 and I'm very pleased. For
>>> the first time, the Deus Ex benchmark has almost no hiccups. I've
>>> never seen it so smooth. At one point, the MB/s BO move rate increase
>>> to 200MB/s, stayed there for a couple of seconds, and then it dropped
>>> to 0 again. The frame rate was OK-ish, so I guess the moves didn't
>>> happen all at once. I also tested DiRT Rally and I haven't been able
>>> to reproduce the low FPS with the consistently-high BO move rate that
>>> I saw several months ago.
>>>
>>> We could do some move throttling there for sure, but it's much better
>>> than it ever was.
>>
>> That's great to hear. If you get a chance, it would be interesting if
>> the attached updated patch improves things even more for you. (The patch
>> I attached previously couldn't work as intended, this one at least might
:)
>
> Frogging101 on IRC noticed that we get a ton of TTM BO moves due to
> visible VRAM thrashing and Michel's patch doesn't help. His kernel is
> up to date with amd-staging. It looks like the only option left is my
> original plan: BO move throttling for visible VRAM by redirecting
> mapped buffers to GTT and not allowing them to go back to VRAM if some
> counter is too high.
>
> Opinions?

I think the next step should be to make radeonsi keep track of how much
VRAM it's trying to use that's expected to be accessed by the CPU, and
to use GTT instead when that exceeds a threshold (probably derived from
vram_vis_size).


That's difficult to estimate. There are apps with 600MB of mapped VRAM and
don't experience any performance issues. And some apps with 300MB of mapped
VRAM do. It only depends on the CPU access pattern, not what radeonsi sees.

Marek



--
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

[-- Attachment #1.2: Type: text/html, Size: 6541 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-05-15 10:11 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 16:33 Plan: BO move throttling for visible VRAM evictions Marek Olšák
     [not found] ` <CAAxE2A4ap8BoOEg1tOF+Ec1vBfZRSANOebikYBaHUfXokY7EwA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-24 16:45   ` Christian König
     [not found]     ` <2667ea68-b700-69a1-391c-b34fe1ed0605-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-24 16:57       ` Marek Olšák
2017-03-24 16:59   ` Deucher, Alexander
2017-03-24 20:17   ` Samuel Pitoiset
2017-03-27  7:35   ` Michel Dänzer
     [not found]     ` <ba8058ce-805b-3e52-095a-01806673344f-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-03-27  7:53       ` Zhou, David(ChunMing)
     [not found]         ` <MWHPR1201MB0206FD6ABB9A0029624E4AF6B4330-3iK1xFAIwjrUF/YbdlDdgWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-03-27  9:29           ` Christian König
     [not found]             ` <a675c878-f191-a6fc-72f3-fd07062c8737-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-27  9:36               ` zhoucm1
     [not found]                 ` <58D8DD01.8050901-5C7GfCeVMHo@public.gmane.org>
2017-03-27  9:55                   ` Christian König
     [not found]                     ` <f9850969-e4ff-f9f2-ed18-53cd2bb031f3-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-28  3:58                       ` zhoucm1
2017-03-28  2:40           ` Michel Dänzer
     [not found]             ` <441ea5b9-d37d-140d-e029-26a7c3ae58cb-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-03-28  3:50               ` zhoucm1
     [not found]                 ` <58D9DD8D.4000803-5C7GfCeVMHo@public.gmane.org>
2017-03-28  6:00                   ` Michel Dänzer
     [not found]                     ` <10958b11-6d28-228a-5142-2c5edadb70ef-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-03-28  8:29                       ` Christian König
     [not found]                         ` <f7ee08e8-46ca-8146-f3a3-d28080e5267f-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-28  8:35                           ` Michel Dänzer
     [not found]                             ` <bb6d20b3-06d1-3f7d-f782-ae18d66d4423-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-03-28  8:41                               ` Christian König
     [not found]                                 ` <efb4f99c-c0b9-56ab-d73c-a03a7e136d66-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-28 10:47                                   ` Marek Olšák
2017-03-28 13:58                           ` Alex Deucher
     [not found]                             ` <CADnq5_P5X1zS4DJ63XQ6Hgi_rGOWYKCdUkGgU2uGMb2Sh1ZnKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-28 14:05                               ` Christian König
2017-03-27 10:29       ` Marek Olšák
     [not found]         ` <CAAxE2A5OCfgu4k-GzNFhGSkgn21jEJoQysdZ6QbdxZaGwPnrEA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-28  1:07           ` Michel Dänzer
     [not found]             ` <03c34461-6918-0875-10c3-488bacbae0e4-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-03-28 10:51               ` Marek Olšák
2017-03-30 10:03   ` Michel Dänzer
     [not found]     ` <9220eda1-5176-36cd-e6b3-801c3e4f759a-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-03-31  3:24       ` Michel Dänzer
     [not found]         ` <78989271-9812-f891-3a00-0d5b39a06b7c-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-04-03 20:11           ` Marek Olšák
     [not found]             ` <CAAxE2A60hubc8jbZkO101sxqVZKR8iub=GsfRovj17+P2zKDKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-14 10:14               ` Michel Dänzer
     [not found]                 ` <aee1e2b7-dd00-e24b-bcfc-e2299e31908b-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-04-16 22:58                   ` Marek Olšák
     [not found]                     ` <CAAxE2A5g7tJG+94XxPr-mdGXkeL1GPMNMaYgc7ATEk7pxsiXfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-17  9:55                       ` Michel Dänzer
     [not found]                         ` <c343b89c-318f-d3af-d02e-4e6843c422f6-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-05-13 21:31                           ` Marek Olšák
     [not found]                             ` <CAAxE2A5_tiOEvLVegNvkuvYrFcsU52H6EfCff3faKBZwPfbuYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-15  2:29                               ` Michel Dänzer
     [not found]                                 ` <a5a8428e-444a-34b9-7fa9-60e77582819a-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-05-15 10:11                                   ` Marek Olšák [this message]
     [not found]                                     ` <CAAxE2A4ex4e-5ShqesZ8oXJj1CnmH6Enhvu4fXs9kDKu9NHeiQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-16  1:57                                       ` Michel Dänzer
     [not found]                                         ` <78fe31b2-2a0a-a1af-6af8-954d892e34ba-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-05-17 12:35                                           ` Marek Olšák
     [not found]                                             ` <CAAxE2A7mh7pmbbszk1qnChPxZtVMzRBWY2GkB1DEcrEZ0t5m3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-18  8:17                                               ` Michel Dänzer
     [not found]                                                 ` <4548bad6-2dc9-29be-b62e-33c181db77af-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-05-18  8:39                                                   ` Christian König
2017-05-18 10:22                                                   ` Marek Olšák
     [not found]                                                     ` <CAAxE2A5L3vRth0dL=niTUR=M5i7_VmP4FEUPBeaEjtY8cveOmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-19  7:45                                                       ` Michel Dänzer
2017-05-15  4:37                               ` zhoucm1
     [not found]                                 ` <5919307C.4020704-5C7GfCeVMHo@public.gmane.org>
2017-05-15 10:18                                   ` Marek Olšák
     [not found]                                     ` <CAAxE2A5Yz8GoRnXwWeeSt5ZxwRbiT9W1RLYPTTUE=vojKukQug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-16  1:58                                       ` Michel Dänzer

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=CAAxE2A4ex4e-5ShqesZ8oXJj1CnmH6Enhvu4fXs9kDKu9NHeiQ@mail.gmail.com \
    --to=maraeo-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@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.