[Intel-xe] [PATCH] drm/xe: Use large rings for compute contexts
Niranjana Vishwanathapura
niranjana.vishwanathapura at intel.com
Fri Jun 2 18:07:02 UTC 2023
Allow compute contexts to submit the maximal amount of work without
blocking userspace.
The original size for user LRC ring's (SZ_16K) was chosen to minimise
memory consumption, without being so small as to frequently stall in the
middle of workloads. With the main consumers being GL / media pipelines
of 2 or 3 batches per frame, we want to support ~10 requests in flight
to allow for the application to control throttling without stalling
within a frame.
Signed-off-by: Chris Wilson <chris.p.wilson at intel.com>
Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
Signed-off-by: Andi Shyti <andi.shyti at linux.intel.com>
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>
---
drivers/gpu/drm/xe/xe_engine.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_engine.c b/drivers/gpu/drm/xe/xe_engine.c
index b3036c4a8ec3..47c9f119fb29 100644
--- a/drivers/gpu/drm/xe/xe_engine.c
+++ b/drivers/gpu/drm/xe/xe_engine.c
@@ -29,6 +29,7 @@ static struct xe_engine *__xe_engine_create(struct xe_device *xe,
{
struct xe_engine *e;
struct xe_gt *gt = hwe->gt;
+ u32 ring_size;
int err;
int i;
@@ -65,8 +66,9 @@ static struct xe_engine *__xe_engine_create(struct xe_device *xe,
e->bind.fence_seqno = XE_FENCE_INITIAL_SEQNO;
}
+ ring_size = (e->class == XE_ENGINE_CLASS_COMPUTE) ? SZ_512K : SZ_16K;
for (i = 0; i < width; ++i) {
- err = xe_lrc_init(e->lrc + i, hwe, e, vm, SZ_16K);
+ err = xe_lrc_init(e->lrc + i, hwe, e, vm, ring_size);
if (err)
goto err_lrc;
}
--
2.21.0.rc0.32.g243a4c7e27
More information about the Intel-xe
mailing list