All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Nirmoy Das <nirmoy.das@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Alan.Harrison@amd.com, Alexander.Deucher@amd.com,
	Felix.Kuehling@amd.com, ray.huang@amd.com,
	Christian.Koenig@amd.com
Subject: Re: [RFC PATCH 2/2] drm/amdgpu: enable gfx wave limiting for high priority compute jobs
Date: Thu, 28 Jan 2021 15:49:03 +0100	[thread overview]
Message-ID: <0adf796d-c0c8-87cc-e7c0-8a29336385f7@gmail.com> (raw)
In-Reply-To: <20210128143554.61100-2-nirmoy.das@amd.com>

Am 28.01.21 um 15:35 schrieb Nirmoy Das:
> Enable gfx wave limiting for gfx jobs before pushing high priority
> compute jobs so that high priority compute jobs gets more resources
> to finish early.

The problem here is what happens if you have multiple high priority jobs 
running at the same time?

Christian

>
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index 024d0a563a65..ee48989dfb4c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -195,6 +195,10 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
>   	if ((ib->flags & AMDGPU_IB_FLAG_EMIT_MEM_SYNC) && ring->funcs->emit_mem_sync)
>   		ring->funcs->emit_mem_sync(ring);
>   
> +	if (ring->funcs->emit_wave_limit && job &&
> +	    job->base.s_priority >= DRM_SCHED_PRIORITY_HIGH)
> +		ring->funcs->emit_wave_limit(ring, true);
> +
>   	if (ring->funcs->insert_start)
>   		ring->funcs->insert_start(ring);
>   
> @@ -295,6 +299,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
>   	ring->current_ctx = fence_ctx;
>   	if (vm && ring->funcs->emit_switch_buffer)
>   		amdgpu_ring_emit_switch_buffer(ring);
> +
> +	if (ring->funcs->emit_wave_limit && job &&
> +	    job->base.s_priority >= DRM_SCHED_PRIORITY_HIGH)
> +		ring->funcs->emit_wave_limit(ring, false);
> +
>   	amdgpu_ring_commit(ring);
>   	return 0;
>   }

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

  reply	other threads:[~2021-01-28 14:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 14:35 [RFC PATCH v3 1/2] drm/amdgpu: add wave limit functionality for gfx8, 9 Nirmoy Das
2021-01-28 14:35 ` [RFC PATCH 2/2] drm/amdgpu: enable gfx wave limiting for high priority compute jobs Nirmoy Das
2021-01-28 14:49   ` Christian König [this message]
2021-01-28 15:21     ` Nirmoy
2021-01-28 15:25       ` Christian König
2021-01-28 16:01         ` Nirmoy
2021-01-28 16:14           ` Christian König
2021-01-28 16:54             ` Nirmoy
  -- strict thread matches above, loose matches on Subject: below --
2021-01-28 13:41 [RFC PATCH v2 1/2] drm/amdgpu: add wave limit functionality for gfx8, 9 Nirmoy Das
2021-01-28 13:41 ` [RFC PATCH 2/2] drm/amdgpu: enable gfx wave limiting for high priority compute jobs Nirmoy Das
2021-01-27 14:56 [RFC PATCH 1/2] drm/amdgpu: add wave limit functionality for gfx8,9 Nirmoy Das
2021-01-27 14:56 ` [RFC PATCH 2/2] drm/amdgpu: enable gfx wave limiting for high priority compute jobs Nirmoy Das

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=0adf796d-c0c8-87cc-e7c0-8a29336385f7@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=Alan.Harrison@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=nirmoy.das@amd.com \
    --cc=ray.huang@amd.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.