From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <matthew.brost@intel.com>
Subject: Re: [PATCH 2/2] drm/xe: Use q->xef for accessing xe file
Date: Thu, 19 Dec 2024 12:27:30 -0800 [thread overview]
Message-ID: <Z2SBskuLlr2uedQQ@orsosgc001> (raw)
In-Reply-To: <20241218053122.2730195-2-lucas.demarchi@intel.com>
On Tue, Dec 17, 2024 at 09:31:22PM -0800, Lucas De Marchi wrote:
>No need to traverse through the vm object as each exec queue maintains a
>reference to xe_file. Also improve/simplify the comment on why xef is
>checked.
>
>Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
LGTM,
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Thanks,
Umesh
>---
> drivers/gpu/drm/xe/xe_exec_queue.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
>index 8005530b5e51e..8948f50ee58ff 100644
>--- a/drivers/gpu/drm/xe/xe_exec_queue.c
>+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
>@@ -770,25 +770,21 @@ bool xe_exec_queue_is_idle(struct xe_exec_queue *q)
> void xe_exec_queue_update_run_ticks(struct xe_exec_queue *q)
> {
> struct xe_device *xe = gt_to_xe(q->gt);
>- struct xe_file *xef;
> struct xe_lrc *lrc;
> u32 old_ts, new_ts;
> int idx;
>
> /*
>- * Jobs that are run during driver load may use an exec_queue, but are
>- * not associated with a user xe file, so avoid accumulating busyness
>- * for kernel specific work.
>+ * Jobs that are executed by kernel doesn't have a corresponding xe_file
>+ * and thus are not accounted.
> */
>- if (!q->vm || !q->vm->xef)
>+ if (!q->xef)
> return;
>
> /* Synchronize with unbind while holding the xe file open */
> if (!drm_dev_enter(&xe->drm, &idx))
> return;
>
>- xef = q->vm->xef;
>-
> /*
> * Only sample the first LRC. For parallel submission, all of them are
> * scheduled together and we compensate that below by multiplying by
>@@ -799,7 +795,7 @@ void xe_exec_queue_update_run_ticks(struct xe_exec_queue *q)
> */
> lrc = q->lrc[0];
> new_ts = xe_lrc_update_timestamp(lrc, &old_ts);
>- xef->run_ticks[q->class] += (new_ts - old_ts) * q->width;
>+ q->xef->run_ticks[q->class] += (new_ts - old_ts) * q->width;
>
> drm_dev_exit(idx);
> }
>--
>2.47.0
>
next prev parent reply other threads:[~2024-12-19 20:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 5:31 [PATCH 1/2] drm/xe: Fix fault on fd close after unbind Lucas De Marchi
2024-12-18 5:31 ` [PATCH 2/2] drm/xe: Use q->xef for accessing xe file Lucas De Marchi
2024-12-19 20:27 ` Umesh Nerlige Ramappa [this message]
2024-12-18 5:38 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe: Fix fault on fd close after unbind Patchwork
2024-12-18 5:38 ` ✓ CI.checkpatch: " Patchwork
2024-12-18 5:40 ` ✓ CI.KUnit: " Patchwork
2024-12-18 5:58 ` ✓ CI.Build: " Patchwork
2024-12-18 6:00 ` ✓ CI.Hooks: " Patchwork
2024-12-18 6:01 ` ✓ CI.checksparse: " Patchwork
2024-12-18 6:41 ` ✗ Xe.CI.BAT: failure " Patchwork
2024-12-18 15:49 ` ✗ Xe.CI.Full: " Patchwork
2024-12-19 20:24 ` [PATCH 1/2] " Umesh Nerlige Ramappa
2024-12-21 1:07 ` Lucas De Marchi
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=Z2SBskuLlr2uedQQ@orsosgc001 \
--to=umesh.nerlige.ramappa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox