amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: "Wang, Kevin(Yang)" <Kevin1.Wang@amd.com>,
	"Sun, Roy" <Roy.Sun@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Nieto, David M" <David.Nieto@amd.com>
Subject: Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track
Date: Mon, 26 Apr 2021 18:08:08 +0200	[thread overview]
Message-ID: <134211da-08ff-d652-b01b-2ef513a6dba8@gmail.com> (raw)
In-Reply-To: <MN2PR12MB3022E9D72A4816C9A693F591A2429@MN2PR12MB3022.namprd12.prod.outlook.com>


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



Am 26.04.21 um 17:30 schrieb Wang, Kevin(Yang):
>
> [AMD Official Use Only - Internal Distribution Only]
>
>
>
>
> ------------------------------------------------------------------------
> *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of 
> Roy Sun <Roy.Sun@amd.com>
> *Sent:* Monday, April 26, 2021 2:27 PM
> *To:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
> *Cc:* Sun, Roy <Roy.Sun@amd.com>; Nieto, David M <David.Nieto@amd.com>
> *Subject:* [PATCH 1/2] drm/scheduler: Change scheduled fence track
> Update the timestamp of scheduled fence on HW
> completion of the previous fences
>
> This allow more accurate tracking of the fence
> execution in HW
>
> Signed-off-by: David M Nieto <david.nieto@amd.com>
> Signed-off-by: Roy Sun <Roy.Sun@amd.com>
> ---
>  drivers/gpu/drm/scheduler/sched_main.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c 
> b/drivers/gpu/drm/scheduler/sched_main.c
> index 92d8de24d0a1..f8e39ab0c41b 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -515,7 +515,7 @@ void drm_sched_resubmit_jobs(struct 
> drm_gpu_scheduler *sched)
>  EXPORT_SYMBOL(drm_sched_resubmit_jobs);
>
>  /**
> - * drm_sched_resubmit_jobs_ext - helper to relunch certain number of 
> jobs from mirror ring list
> + * drm_sched_resubmit_jobs_ext - helper to relaunch certain number of 
> jobs from pending list
>   *
>   * @sched: scheduler instance
>   * @max: job numbers to relaunch
> @@ -671,7 +671,7 @@ drm_sched_select_entity(struct drm_gpu_scheduler 
> *sched)
>  static struct drm_sched_job *
>  drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
>  {
> -       struct drm_sched_job *job;
> +       struct drm_sched_job *job, *next;
>
>          /*
>           * Don't destroy jobs while the timeout worker is running  OR 
> thread
> @@ -690,6 +690,14 @@ drm_sched_get_cleanup_job(struct 
> drm_gpu_scheduler *sched)
>          if (job && dma_fence_is_signaled(&job->s_fence->finished)) {
>                  /* remove job from pending_list */
>                  list_del_init(&job->list);
> We just need to record the scheduled time of the next job. So we
> need not to check the rest job.
>
> [kevin]:
> ok, it is fine for me with the timestamp flag check.
> Reviewed-by: Kevin Wang <kevin1.wang@amd.com>

Actually please drop that extra check.

The timestamp is guaranteed to be set on the next job or otherwise we 
wouldn't got here in the first place.

I've considered dropping the flag for quite a while and don't want any 
new users of this.

Christian.

>
> +               /* account for the next fence in the queue */
> +               next = list_first_entry_or_null(&sched->pending_list,
> +                               struct drm_sched_job, list);
> +               if (next && test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT,
> + &job->s_fence->finished.flags)) {
> + next->s_fence->scheduled.timestamp =
> + job->s_fence->finished.timestamp;
> +               }
>          } else {
>                  job = NULL;
>                  /* queue timeout for next job */
> -- 
> 2.31.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7CKevin1.Wang%40amd.com%7C0cebaf8d37e144c6b82108d9087c502e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637550152295564379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Hdiil9BC2sp2pUI1121yZWELoCQqhDqTnbr7E9oVutw%3D&amp;reserved=0 
> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7CKevin1.Wang%40amd.com%7C0cebaf8d37e144c6b82108d9087c502e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637550152295564379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Hdiil9BC2sp2pUI1121yZWELoCQqhDqTnbr7E9oVutw%3D&amp;reserved=0>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[-- Attachment #1.2: Type: text/html, Size: 9041 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

  reply	other threads:[~2021-04-26 16:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26  6:27 [PATCH 1/2] drm/scheduler: Change scheduled fence track Roy Sun
2021-04-26  6:27 ` [PATCH 2/2] drm/amdgpu: Add show_fdinfo() interface Roy Sun
2021-04-26  6:49 ` [PATCH 1/2] drm/scheduler: Change scheduled fence track Christian König
2021-04-26 19:24   ` Deucher, Alexander
2021-04-26 19:40     ` Deucher, Alexander
2021-04-26 19:48       ` Christian König
2021-04-26 19:51         ` Deucher, Alexander
2021-04-28  8:32           ` Deng, Emily
2021-04-28  9:06             ` Christian König
2021-04-28  9:15               ` Deng, Emily
2021-05-04 20:23               ` Alex Deucher
2021-05-05  7:27                 ` Christian König
2021-05-05 19:55                   ` Nieto, David M
2021-04-26 15:30 ` Wang, Kevin(Yang)
2021-04-26 16:08   ` Christian König [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-23 10:55 Roy Sun
2021-04-23 11:09 ` Wang, Kevin(Yang)
2021-04-23  9:19 Roy Sun
2021-04-21  8:03 Roy Sun
2021-04-21  3:46 Roy Sun
2021-04-22  7:06 ` Christian König
2021-04-20 11:51 Roy Sun
2021-04-19  6:26 Roy Sun
2021-04-16  5:04 Roy Sun
2021-04-16 11:26 ` Christian König
2021-04-16 13:50   ` Nirmoy
2021-04-14 13:59 Roy Sun
2021-04-13 12:14 Roy Sun
2021-04-12 12:57 Roy Sun

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=134211da-08ff-d652-b01b-2ef513a6dba8@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=David.Nieto@amd.com \
    --cc=Kevin1.Wang@amd.com \
    --cc=Roy.Sun@amd.com \
    --cc=amd-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).