Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Patelczyk <maciej.patelczyk@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	Raag Jadav <raag.jadav@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	<niranjana.vishwanathapura@intel.com>,
	Thomas Hellstrom <thomas.hellstrom@intel.com>
Subject: Re: [PATCH 1/2] drm/xe: introduce xe_gt_reset_wait to wait for async gt reset
Date: Mon, 9 Dec 2024 20:39:32 +0100	[thread overview]
Message-ID: <587f6772-4450-4357-b7f9-3c0e8defb511@intel.com> (raw)
In-Reply-To: <hb75rvvovu6r7owm7ly3yjwh7x6nqxb225ode7pe6qfu34pmgc@zxhtb5q3xbyj>

On 9.12.2024 17:22, Lucas De Marchi wrote:

> On Mon, Dec 09, 2024 at 04:54:45PM +0200, Raag Jadav wrote:
>> On Mon, Dec 09, 2024 at 04:42:49PM +0200, Raag Jadav wrote:
>>> On Mon, Dec 09, 2024 at 03:12:09PM +0100, Maciej Patelczyk wrote:
>>> > The reset of the GT is asynchronous.
>>> > Adding a wait helper to wait until gt reset is done.
>>> >
>>> > Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
>>> > ---
>>> >  drivers/gpu/drm/xe/tests/xe_bo.c   |  2 +-
>>> >  drivers/gpu/drm/xe/tests/xe_mocs.c |  2 +-
>>> >  drivers/gpu/drm/xe/xe_gt.h         | 12 ++++++++++++
>>> >  drivers/gpu/drm/xe/xe_gt_debugfs.c |  2 +-
>>> >  4 files changed, 15 insertions(+), 3 deletions(-)
>>> >
>>> > diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c 
>>> b/drivers/gpu/drm/xe/tests/xe_bo.c
>>> > index c9ec7a313c6b..b51434fc5bd1 100644
>>> > --- a/drivers/gpu/drm/xe/tests/xe_bo.c
>>> > +++ b/drivers/gpu/drm/xe/tests/xe_bo.c
>>> > @@ -266,7 +266,7 @@ static int evict_test_run_tile(struct 
>>> xe_device *xe, struct xe_tile *tile, struc
>>> >           */
>>> >          for_each_gt(__gt, xe, id) {
>>> >              xe_gt_reset_async(__gt);
>>> > -            flush_work(&__gt->reset.worker);
>>> > +            xe_gt_reset_wait(__gt);
>>>
>>> Why not just create a
>>>
>>> void xe_gt_reset_sync(gt)
>>> {
>>>     xe_gt_reset_async()
>>>     flush_work()
>>> }
>
>
> maybe, the problem I think is the 1 letter difference between
>
> xe_gt_reset_async
> xe_gt_reset_sync
>
> that may be confusing/error-prone.
>
> I like the helper, just think we need the naming to be polished.
>
> +Thomas
>
> maybe having this as xe_gt_reset() / xe_gt_reset_async()?
>
>
> Lucas De Marchi
>
xe_gt_reset(), xe_gt_reset_async() would be my vote.


I proposed only the wait helper as I did not want to block under mutex 
for the whole period of time when the reset worker will be scheduler and 
executed.

That could be seconds.

Maciej


>
>>>
>>> and use it instead?
>>
>> Or perhaps reuse force_reset_sync()?
>>
>> Raag

  reply	other threads:[~2024-12-09 19:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 14:12 [PATCH 0/2] drm/xe: adding wait helper for gt async reset Maciej Patelczyk
2024-12-09 14:12 ` [PATCH 1/2] drm/xe: introduce xe_gt_reset_wait to wait for async gt reset Maciej Patelczyk
2024-12-09 14:42   ` Raag Jadav
2024-12-09 14:54     ` Raag Jadav
2024-12-09 16:22       ` Lucas De Marchi
2024-12-09 19:39         ` Maciej Patelczyk [this message]
2024-12-09 20:05           ` Lucas De Marchi
2024-12-09 14:12 ` [PATCH 2/2] drm/xe: make change ccs_mode a synchronous action Maciej Patelczyk
2024-12-09 16:26   ` Lucas De Marchi
2024-12-09 19:31     ` Maciej Patelczyk
2024-12-09 14:50 ` ✓ CI.Patch_applied: success for drm/xe: adding wait helper for gt async reset Patchwork
2024-12-09 14:50 ` ✓ CI.checkpatch: " Patchwork
2024-12-09 14:51 ` ✗ CI.KUnit: failure " Patchwork

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=587f6772-4450-4357-b7f9-3c0e8defb511@intel.com \
    --to=maciej.patelczyk@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=niranjana.vishwanathapura@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=thomas.hellstrom@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