Plan: BO move throttling for visible VRAM evictions
Christian König
deathsimple at vodafone.de
Tue Mar 28 08:29:44 UTC 2017
Am 28.03.2017 um 08:00 schrieb Michel Dänzer:
> On 28/03/17 12:50 PM, zhoucm1 wrote:
>> On 2017年03月28日 10:40, Michel Dänzer wrote:
>>> On 27/03/17 04:53 PM, Zhou, David(ChunMing) wrote:
>>>> For APU special case, can we prevent eviction happening between VRAM
>>>> <----> GTT?
>>> We can, if we can close the performance gap between VRAM and GTT. We
>>> measured around 30% gap a while ago, though right now I'm only measuring
>>> ~5%, but the test system has slower RAM now (still dual channel though).
>> My impression VRAM and GTT have no much difference for APU case, if I'm
>> wrong, pls correct me.
> The Mesa patch below makes radeonsi use mostly GTT instead of mostly
> VRAM, and slows down Unigine Valley by about 5% on my desktop Kaveri.
> You can try it for yourself.
Additional to that you still need the stolen VRAM on APUs for page
tables and DCE.
So we need to keep the eviction from VRAM to GTT enabled, but what we
don't do is swapping them back in because Marek added the GTT flags on
APUs as extra domain to look into.
In other word once BOs are removed from VRAM they are only swapped back
in if the hardware needs it.
Regards,
Christian.
>
>
> diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
> index da6f0206d7..47661cab76 100644
> --- a/src/gallium/drivers/radeon/r600_buffer_common.c
> +++ b/src/gallium/drivers/radeon/r600_buffer_common.c
> @@ -175,9 +175,11 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen,
> * placements even with a low amount of stolen VRAM.
> */
> if (!rscreen->info.has_dedicated_vram &&
> - (rscreen->info.drm_major < 3 || rscreen->info.drm_minor < 6) &&
> - res->domains == RADEON_DOMAIN_VRAM)
> - res->domains = RADEON_DOMAIN_VRAM_GTT;
> + res->domains == RADEON_DOMAIN_VRAM &&
> + !(res->b.b.bind & PIPE_BIND_SCANOUT)) {
> + res->domains = RADEON_DOMAIN_GTT;
> + res->flags |= RADEON_FLAG_GTT_WC;
> + }
>
> if (rscreen->debug_flags & DBG_NO_WC)
> res->flags &= ~RADEON_FLAG_GTT_WC;
>
>
>
More information about the amd-gfx
mailing list