* [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches
@ 2017-10-17 9:26 Chris Wilson
2017-10-17 10:19 ` ✗ Fi.CI.BAT: warning for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2017-10-17 9:26 UTC (permalink / raw)
To: intel-gfx
After being requested to idle the GPU, flush the idle worker to drop the
residual active state, and any internal object caches.
References: https://bugs.freedesktop.org/show_bug.cgi?id=102655
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 40287e9f00d7..bfcdfb6b7225 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4266,6 +4266,9 @@ i915_drop_caches_set(void *data, u64 val)
i915_gem_shrink_all(dev_priv);
fs_reclaim_release(GFP_KERNEL);
+ if (!READ_ONCE(dev_priv->gt.active_requests))
+ drain_delayed_work(&dev_priv->gt.idle_work);
+
if (val & DROP_FREED) {
synchronize_rcu();
i915_gem_drain_freed_objects(dev_priv);
--
2.15.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread* ✗ Fi.CI.BAT: warning for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches 2017-10-17 9:26 [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches Chris Wilson @ 2017-10-17 10:19 ` Patchwork 2017-10-18 12:16 ` [PATCH v2] " Chris Wilson ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: Patchwork @ 2017-10-17 10:19 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915: Flush the idle-worker for debugfs/i915_drop_caches URL : https://patchwork.freedesktop.org/series/32102/ State : warning == Summary == Series 32102v1 drm/i915: Flush the idle-worker for debugfs/i915_drop_caches https://patchwork.freedesktop.org/api/1.0/series/32102/revisions/1/mbox/ Test kms_cursor_legacy: Subgroup basic-busy-flip-before-cursor-legacy: pass -> FAIL (fi-gdg-551) fdo#102618 Test kms_pipe_crc_basic: Subgroup nonblocking-crc-pipe-b: pass -> SKIP (fi-hsw-4770r) fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618 fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:442s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:454s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:372s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:528s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:263s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:498s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:501s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:496s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:483s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:558s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:421s fi-gdg-551 total:289 pass:177 dwarn:1 dfail:0 fail:2 skip:109 time:261s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:575s fi-hsw-4770r total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:436s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:437s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:497s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:460s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:489s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:574s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:480s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:583s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:554s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:452s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:647s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:523s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:498s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:461s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:565s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:423s e4dedb9e7c81401239b67d07ed8ed07fcd2f5129 drm-tip: 2017y-10m-17d-07h-45m-57s UTC integration manifest b4d992753d1e drm/i915: Flush the idle-worker for debugfs/i915_drop_caches == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6065/ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches 2017-10-17 9:26 [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches Chris Wilson 2017-10-17 10:19 ` ✗ Fi.CI.BAT: warning for " Patchwork @ 2017-10-18 12:16 ` Chris Wilson 2017-10-18 12:55 ` Joonas Lahtinen 2017-10-18 12:47 ` ✓ Fi.CI.BAT: success for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) Patchwork 2017-10-18 21:36 ` ✗ Fi.CI.IGT: warning " Patchwork 3 siblings, 1 reply; 7+ messages in thread From: Chris Wilson @ 2017-10-18 12:16 UTC (permalink / raw) To: intel-gfx After being requested to idle the GPU, flush the idle worker to drop the residual active state, and any internal object caches. v2: By popular demand, introduce DROP_IDLE for fine-grained control from userspace, though it should be used as part of a DROP_ACTIVE | DROP_RETIRE | DROP_IDLE | DROP_FREED sequence. v3: Convert to BIT() to sell it to Joonas. References: https://bugs.freedesktop.org/show_bug.cgi?id=102655 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> --- drivers/gpu/drm/i915/i915_debugfs.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 5dcc702942ec..c65e381b85f3 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -4179,18 +4179,20 @@ DEFINE_SIMPLE_ATTRIBUTE(i915_ring_test_irq_fops, i915_ring_test_irq_get, i915_ring_test_irq_set, "0x%08llx\n"); -#define DROP_UNBOUND 0x1 -#define DROP_BOUND 0x2 -#define DROP_RETIRE 0x4 -#define DROP_ACTIVE 0x8 -#define DROP_FREED 0x10 -#define DROP_SHRINK_ALL 0x20 +#define DROP_UNBOUND BIT(0) +#define DROP_BOUND BIT(1) +#define DROP_RETIRE BIT(2) +#define DROP_ACTIVE BIT(3) +#define DROP_FREED BIT(4) +#define DROP_SHRINK_ALL BIT(5) +#define DROP_IDLE BIT(6) #define DROP_ALL (DROP_UNBOUND | \ DROP_BOUND | \ DROP_RETIRE | \ DROP_ACTIVE | \ DROP_FREED | \ - DROP_SHRINK_ALL) + DROP_SHRINK_ALL |\ + DROP_IDLE) static int i915_drop_caches_get(void *data, u64 *val) { @@ -4206,7 +4208,8 @@ i915_drop_caches_set(void *data, u64 val) struct drm_device *dev = &dev_priv->drm; int ret = 0; - DRM_DEBUG("Dropping caches: 0x%08llx\n", val); + DRM_DEBUG("Dropping caches: 0x%08llx [0x%08llx]\n", + val, val & DROP_ALL); /* No need to check and wait for gpu resets, only libdrm auto-restarts * on ioctls on -EAGAIN. */ @@ -4237,6 +4240,9 @@ i915_drop_caches_set(void *data, u64 val) i915_gem_shrink_all(dev_priv); fs_reclaim_release(GFP_KERNEL); + if (val & DROP_IDLE) + drain_delayed_work(&dev_priv->gt.idle_work); + if (val & DROP_FREED) { synchronize_rcu(); i915_gem_drain_freed_objects(dev_priv); -- 2.15.0.rc1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches 2017-10-18 12:16 ` [PATCH v2] " Chris Wilson @ 2017-10-18 12:55 ` Joonas Lahtinen 0 siblings, 0 replies; 7+ messages in thread From: Joonas Lahtinen @ 2017-10-18 12:55 UTC (permalink / raw) To: Chris Wilson, intel-gfx On Wed, 2017-10-18 at 13:16 +0100, Chris Wilson wrote: > After being requested to idle the GPU, flush the idle worker to drop the > residual active state, and any internal object caches. > > v2: By popular demand, introduce DROP_IDLE for fine-grained control from > userspace, though it should be used as part of a > DROP_ACTIVE | DROP_RETIRE | DROP_IDLE | DROP_FREED > sequence. > v3: Convert to BIT() to sell it to Joonas. > > References: https://bugs.freedesktop.org/show_bug.cgi?id=102655 > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> <SNIP> > @@ -4206,7 +4208,8 @@ i915_drop_caches_set(void *data, u64 val) > struct drm_device *dev = &dev_priv->drm; > int ret = 0; > > - DRM_DEBUG("Dropping caches: 0x%08llx\n", val); > + DRM_DEBUG("Dropping caches: 0x%08llx [0x%08llx]\n", > + val, val & DROP_ALL); > > /* No need to check and wait for gpu resets, only libdrm auto-restarts > * on ioctls on -EAGAIN. */ > @@ -4237,6 +4240,9 @@ i915_drop_caches_set(void *data, u64 val) > i915_gem_shrink_all(dev_priv); > fs_reclaim_release(GFP_KERNEL); We have call to i915_gem_wait_for_idle (function with no kerneldoc) above so it might be worthy to comment something along; /* Idling the GT will release all internal objects, too. */ > + if (val & DROP_IDLE) > + drain_delayed_work(&dev_priv->gt.idle_work); And maybe add kerneldoc for i915_gem_wait_for_idle as follow-up. Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) 2017-10-17 9:26 [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches Chris Wilson 2017-10-17 10:19 ` ✗ Fi.CI.BAT: warning for " Patchwork 2017-10-18 12:16 ` [PATCH v2] " Chris Wilson @ 2017-10-18 12:47 ` Patchwork 2017-10-18 21:36 ` ✗ Fi.CI.IGT: warning " Patchwork 3 siblings, 0 replies; 7+ messages in thread From: Patchwork @ 2017-10-18 12:47 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) URL : https://patchwork.freedesktop.org/series/32102/ State : success == Summary == Series 32102v2 drm/i915: Flush the idle-worker for debugfs/i915_drop_caches https://patchwork.freedesktop.org/api/1.0/series/32102/revisions/2/mbox/ Test chamelium: Subgroup dp-crc-fast: fail -> PASS (fi-kbl-7500u) fdo#102514 fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514 fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:456s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:376s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:530s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:263s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:502s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:495s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:498s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:479s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:416s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:252s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:577s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:426s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:440s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:481s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:461s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:493s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:574s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:473s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:579s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:546s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:451s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:649s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:523s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:503s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:462s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:567s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:420s fi-bdw-5557u failed to connect after reboot 8b18ad103908e9ccee79db8c0c29bc5a56ff81f8 drm-tip: 2017y-10m-18d-08h-27m-31s UTC integration manifest 0c1e1579f102 drm/i915: Flush the idle-worker for debugfs/i915_drop_caches == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6093/ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* ✗ Fi.CI.IGT: warning for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) 2017-10-17 9:26 [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches Chris Wilson ` (2 preceding siblings ...) 2017-10-18 12:47 ` ✓ Fi.CI.BAT: success for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) Patchwork @ 2017-10-18 21:36 ` Patchwork 2017-10-18 21:55 ` Chris Wilson 3 siblings, 1 reply; 7+ messages in thread From: Patchwork @ 2017-10-18 21:36 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) URL : https://patchwork.freedesktop.org/series/32102/ State : warning == Summary == Test perf: Subgroup polling: fail -> PASS (shard-hsw) fdo#102252 Test kms_cursor_crc: Subgroup cursor-64x64-onscreen: pass -> SKIP (shard-hsw) fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252 shard-hsw total:2540 pass:1430 dwarn:0 dfail:0 fail:8 skip:1102 time:9224s == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6093/shards.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ✗ Fi.CI.IGT: warning for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) 2017-10-18 21:36 ` ✗ Fi.CI.IGT: warning " Patchwork @ 2017-10-18 21:55 ` Chris Wilson 0 siblings, 0 replies; 7+ messages in thread From: Chris Wilson @ 2017-10-18 21:55 UTC (permalink / raw) To: Patchwork; +Cc: intel-gfx Quoting Patchwork (2017-10-18 22:36:41) > == Series Details == > > Series: drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) > URL : https://patchwork.freedesktop.org/series/32102/ > State : warning > > == Summary == > > Test perf: > Subgroup polling: > fail -> PASS (shard-hsw) fdo#102252 > Test kms_cursor_crc: > Subgroup cursor-64x64-onscreen: > pass -> SKIP (shard-hsw) Double checked that indeed we didn't pass in DROP_IDLE inside igt (yet) and pushed. Thanks for the review, -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-10-18 21:55 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-17 9:26 [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches Chris Wilson 2017-10-17 10:19 ` ✗ Fi.CI.BAT: warning for " Patchwork 2017-10-18 12:16 ` [PATCH v2] " Chris Wilson 2017-10-18 12:55 ` Joonas Lahtinen 2017-10-18 12:47 ` ✓ Fi.CI.BAT: success for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) Patchwork 2017-10-18 21:36 ` ✗ Fi.CI.IGT: warning " Patchwork 2017-10-18 21:55 ` Chris Wilson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox