[Intel-xe] [PATCH] drm/xe: Fix potential deadlock handling page faults
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Fri Mar 24 16:21:17 UTC 2023
Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
On 2023-03-21 04:42, Matthew Brost wrote:
> Within a class the GuC will hault scheduling if the head of the queue
> can't be scheduled the queue will block. This can lead to deadlock if
> BCS0-7 all have faults and another engine on BCS0-7 is at head of the
> GuC scheduling queue as the migration engine used to fix tthe fault will
> be blocked. To work around this set the migration engine to the highest
> priority when servicing page faults.
>
> v2 (Maarten): Set priority to kernel once at creation
>
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
> ---
> drivers/gpu/drm/xe/xe_migrate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
> index 77a6d71f6e89..546711a0ec39 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -359,6 +359,8 @@ struct xe_migrate *xe_migrate_init(struct xe_gt *gt)
> xe_vm_close_and_put(vm);
> return ERR_CAST(m->eng);
> }
> + if (xe->info.supports_usm)
> + m->eng->entity->priority = DRM_SCHED_PRIORITY_KERNEL;
>
> mutex_init(&m->job_mutex);
>
More information about the Intel-xe
mailing list