Skip to contentSkip to conversation

drm/i915/gem: Use large rings for compute contexts

PATCH Superseded Tejas Upadhyay 3 participants 4 messages May 16, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/gem: Use large rings for compute contexts

From: Chris Wilson <[email protected]>

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.

---
 drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_context.c +2 -0
index 5402a7bbcb1d..0edb7be6fa5e 100644
@@ -965,6 +965,8 @@ static int intel_context_set_gem(struct intel_context *ce,
 
 	GEM_BUG_ON(intel_context_is_pinned(ce));
 	ce->ring_size = SZ_16K;
+	if (ce->engine->class == COMPUTE_CLASS)
+		ce->ring_size = SZ_512K;
 
 	i915_vm_put(ce->vm);
 	ce->vm = i915_gem_context_get_eb_vm(ctx);
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 22 lines · Tejas Upadhyay

From: Chris Wilson <[email protected]>

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.

---
 drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_context.c +0 -0
index 5402a7bbcb1d..0edb7be6fa5e 100644

drivers/gpu/drm/i915/gem/i915_gem_context.c static int intel_context_set_gem(struct intel_context *ce, · line 969

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_context.c +2 -0
@@ -965,6 +965,8 @@ static int intel_context_set_gem(struct intel_context *ce,
 
 	GEM_BUG_ON(intel_context_is_pinned(ce));
 	ce->ring_size = SZ_16K;
+	if (ce->engine->class == COMPUTE_CLASS)
+		ce->ring_size = SZ_512K;

Not a huge fan of first initializing something, and then changing it in some cases.

Why not if (ce->engine->class == COMPUTE_CLASS) ... else ...?

BR,
Jani.

Quoted 3 lines
drivers/gpu/drm/i915/gem/i915_gem_context.c +0 -0
 	i915_vm_put(ce->vm);
 	ce->vm = i915_gem_context_get_eb_vm(ctx);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gem: Use large rings for compute contexts

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/i915/gem: Use large rings for compute contexts
URL : https://patchwork.freedesktop.org/series/117814/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13151 -> Patchwork_117814v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/index.html

Participating hosts (38 -> 37)
------------------------------

Missing (1): fi-snb-2520m

Known issues
------------

Here are the changes found in Patchwork_117814v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@load:
- bat-adls-5: [PASS][1] -> [ABORT][2] ([i915#4391])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/bat-adls-5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-adls-5/igt@[email protected]

* igt@i915_selftest@live@gt_engines:
- bat-atsm-1: [PASS][3] -> [FAIL][4] ([i915#6268])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/bat-atsm-1/igt@i915_selftest@live@gt_engines.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-atsm-1/igt@i915_selftest@live@gt_engines.html

* igt@i915_selftest@live@hangcheck:
- bat-dg2-11: [PASS][5] -> [ABORT][6] ([i915#7913] / [i915#7979])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/bat-dg2-11/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-dg2-11/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@requests:
- bat-rpls-1: [PASS][7] -> [ABORT][8] ([i915#4983] / [i915#7911] / [i915#7920])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/bat-rpls-1/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rpls-2: NOTRUN -> [DMESG-WARN][9] ([i915#6367])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s2idle-without-i915:
- bat-rpls-2: NOTRUN -> [ABORT][10] ([i915#6687])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-rpls-2/igt@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][11] ([i915#1845] / [i915#5354])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-dg2-11/igt@[email protected]

#### Possible fixes ####

* igt@i915_pm_rpm@basic-rte:
- {bat-mtlp-8}: [TIMEOUT][12] -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/bat-mtlp-8/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-mtlp-8/igt@[email protected]

* igt@i915_selftest@live@reset:
- bat-rpls-2: [ABORT][14] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#8347]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/bat-rpls-2/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1:
- bat-dg2-8: [FAIL][16] ([i915#7932]) -> [PASS][17] +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

#### Warnings ####

* igt@i915_suspend@basic-s3-without-i915:
- fi-tgl-1115g4: [INCOMPLETE][18] ([i915#7443] / [i915#7953] / [i915#8102]) -> [INCOMPLETE][19] ([i915#7443] / [i915#8102])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/fi-tgl-1115g4/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/fi-tgl-1115g4/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#7443]: https://gitlab.freedesktop.org/drm/intel/issues/7443
[i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7920]: https://gitlab.freedesktop.org/drm/intel/issues/7920
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#7953]: https://gitlab.freedesktop.org/drm/intel/issues/7953
[i915#7979]: https://gitlab.freedesktop.org/drm/intel/issues/7979
[i915#8102]: https://gitlab.freedesktop.org/drm/intel/issues/8102
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347

Build changes
-------------

* Linux: CI_DRM_13151 -> Patchwork_117814v1

CI-20190529: 20190529
CI_DRM_13151: 4a28d03908b9d284f0b64a1fd9f5304761460db8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7292: 9d9475ffd3b5ae18fd8ec120595385f6c562f249 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_117814v1: 4a28d03908b9d284f0b64a1fd9f5304761460db8 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

cdc0e57796e3 drm/i915/gem: Use large rings for compute contexts

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/index.html

#3 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gem: Use large rings for compute contexts

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/i915/gem: Use large rings for compute contexts
URL : https://patchwork.freedesktop.org/series/117814/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13151_full -> Patchwork_117814v1_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (7 -> 7)
------------------------------

No changes in participating hosts

Known issues
------------

Here are the changes found in Patchwork_117814v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2:
- shard-glk: [PASS][1] -> [FAIL][2] ([i915#79])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-glk6/igt@kms_flip@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-glk3/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend@b-dp1:
- shard-apl: [PASS][3] -> [ABORT][4] ([i915#180])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-apl1/igt@kms_flip@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-apl3/igt@kms_flip@[email protected]

#### Possible fixes ####

* igt@gem_exec_fair@basic-none@bcs0:
- {shard-rkl}: [FAIL][5] ([i915#2842]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-rkl-7/igt@gem_exec_fair@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-rkl-6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][7] ([i915#2842]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-glk9/igt@gem_exec_fair@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-glk1/igt@gem_exec_fair@[email protected]

* igt@i915_pm_dc@dc9-dpms:
- {shard-tglu}: [SKIP][9] ([i915#4281]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-tglu-6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-tglu-4/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-idle@vcs0:
- {shard-dg1}: [FAIL][11] ([i915#3591]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-dg1-14/igt@i915_pm_rc6_residency@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-dg1-18/igt@i915_pm_rc6_residency@[email protected]

* igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- {shard-rkl}: [SKIP][13] ([i915#1397]) -> [PASS][14] +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-rkl-6/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-rkl-7/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-glk: [FAIL][15] ([i915#2346]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-glk1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-glk5/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1:
- shard-glk: [FAIL][17] ([i915#79]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13151/shard-glk2/igt@kms_flip@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/shard-glk6/igt@kms_flip@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
[i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8414]: https://gitlab.freedesktop.org/drm/intel/issues/8414

Build changes
-------------

* Linux: CI_DRM_13151 -> Patchwork_117814v1

CI-20190529: 20190529
CI_DRM_13151: 4a28d03908b9d284f0b64a1fd9f5304761460db8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7292: 9d9475ffd3b5ae18fd8ec120595385f6c562f249 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_117814v1: 4a28d03908b9d284f0b64a1fd9f5304761460db8 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_117814v1/index.html