[PATCH] drm/xe: Add page queue multiplier
Randhawa, Jagmeet
jagmeet.randhawa at intel.com
Tue Apr 8 17:52:31 UTC 2025
On 4/8/2025 8:59 AM, Matthew Brost wrote:
> For an unknown reason the math to determine the PF queue size does is
> not correct - compute UMD applications are overflowing the PF queue
> which is fatal. A multipplier of 8 fixes the problem.
>
> Fixes: 3338e4f90c14 ("drm/xe: Use topology to determine page fault queue size")
> Cc: stable at vger.kernel.org
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_pagefault.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> index 9fa11e837dd1..10622ca471a2 100644
> --- a/drivers/gpu/drm/xe/xe_gt_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> @@ -435,9 +435,16 @@ static int xe_alloc_pf_queue(struct xe_gt *gt, struct pf_queue *pf_queue)
> num_eus = bitmap_weight(gt->fuse_topo.eu_mask_per_dss,
> XE_MAX_EU_FUSE_BITS) * num_dss;
>
> - /* user can issue separate page faults per EU and per CS */
> + /*
> + * user can issue separate page faults per EU and per CS
> + *
> + * XXX: Multiplier required as compute UMD are getting PF queue errors
> + * without it. Follow on why this multiplier is required.
> + */
> +#define PF_MULTIPLIER 8
> pf_queue->num_dw =
> - (num_eus + XE_NUM_HW_ENGINES) * PF_MSG_LEN_DW;
> + (num_eus + XE_NUM_HW_ENGINES) * PF_MSG_LEN_DW * PF_MULTIPLIER;
> +#undef PF_MULTIPLIER
>
> pf_queue->gt = gt;
> pf_queue->data = devm_kcalloc(xe->drm.dev, pf_queue->num_dw,
Patch looks good and addresses the PF queue overflow issue seen with
compute UMD apps.
Minor note: there's a small typo in commit message ("multipplier" to
multiplier).
Reviewed-by: Jagmeet Randhawa <jagmeet.randhawa at intel.com>
More information about the Intel-xe
mailing list