public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH igt 1/4] lib: Add DROP_IDLE
@ 2017-10-18 12:34 Chris Wilson
  2017-10-18 12:34 ` [PATCH igt 2/4] lib: Idle the GT when quiescing the GPU Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Chris Wilson @ 2017-10-18 12:34 UTC (permalink / raw)
  To: intel-gfx

A new flag for an old API; now we can request that the driver flush its
idle_worker to release internal caches.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_debugfs.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index 4fa49d21..d90dd7a6 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -179,6 +179,12 @@ void igt_require_hpd_storm_ctl(int fd);
  * system.
  */
 #define DROP_SHRINK_ALL 0x20
+/**
+ * DROP_IDLE:
+ *
+ * Flush the driver's idle_worker, releasing internal caches and wakerefs.
+ */
+#define DROP_IDLE 0x40
 /**
  * DROP_ALL:
  *
@@ -189,7 +195,8 @@ void igt_require_hpd_storm_ctl(int fd);
 		  DROP_SHRINK_ALL | \
 		  DROP_RETIRE | \
 		  DROP_ACTIVE | \
-		  DROP_FREED)
+		  DROP_FREED | \
+		  DROP_IDLE)
 
 bool igt_drop_caches_has(int fd, uint64_t val);
 void igt_drop_caches_set(int fd, uint64_t val);
-- 
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

* [PATCH igt 2/4] lib: Idle the GT when quiescing the GPU
  2017-10-18 12:34 [PATCH igt 1/4] lib: Add DROP_IDLE Chris Wilson
@ 2017-10-18 12:34 ` Chris Wilson
  2017-10-18 12:34 ` [PATCH igt 3/4] lib: Flush the driver's internal cache of objects before counting Chris Wilson
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-10-18 12:34 UTC (permalink / raw)
  To: intel-gfx

As part of the general procedure for ensuring the GPU is idle, we also
want to ask the driver to flush its idle_worker. The idle_worker is
responsible for releasing both the driver's internal cache of buffers
and cache of state (such as the prolonged GT wakeref). By flushing the
idle_worker we ensure that each test (each caller needing an idle gpu)
has a clean slate; not carrying over caches from one test to the next.

Note this is a silent no-op for kernels that do not know about DROP_IDLE,
old bugs will remain.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 lib/drmtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 8a07152c..15a46477 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -187,7 +187,7 @@ void gem_quiescent_gpu(int fd)
 	gem_sync(fd, obj.handle);
 	gem_close(fd, obj.handle);
 
-	igt_drop_caches_set(fd, DROP_RETIRE | DROP_FREED);
+	igt_drop_caches_set(fd, DROP_RETIRE | DROP_IDLE | DROP_FREED);
 }
 
 /**
-- 
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

* [PATCH igt 3/4] lib: Flush the driver's internal cache of objects before counting
  2017-10-18 12:34 [PATCH igt 1/4] lib: Add DROP_IDLE Chris Wilson
  2017-10-18 12:34 ` [PATCH igt 2/4] lib: Idle the GT when quiescing the GPU Chris Wilson
@ 2017-10-18 12:34 ` Chris Wilson
  2017-10-18 12:34 ` [PATCH igt 4/4] lib: Free all internal buffers before measuring available memory Chris Wilson
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-10-18 12:34 UTC (permalink / raw)
  To: intel-gfx

As the driver itself keeps a cache of objects, these too need to be
flushed prior to producing a stable count of objects.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102655
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 60b29e3a..8b33b478 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -1128,7 +1128,8 @@ static int get_object_count(int fd)
 {
 	int dir, ret, scanned;
 
-	igt_drop_caches_set(fd, DROP_RETIRE | DROP_ACTIVE | DROP_FREED);
+	igt_drop_caches_set(fd,
+			    DROP_RETIRE | DROP_ACTIVE | DROP_IDLE | DROP_FREED);
 
 	dir = igt_debugfs_dir(fd);
 	scanned = igt_sysfs_scanf(dir, "i915_gem_objects",
-- 
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

* [PATCH igt 4/4] lib: Free all internal buffers before measuring available memory
  2017-10-18 12:34 [PATCH igt 1/4] lib: Add DROP_IDLE Chris Wilson
  2017-10-18 12:34 ` [PATCH igt 2/4] lib: Idle the GT when quiescing the GPU Chris Wilson
  2017-10-18 12:34 ` [PATCH igt 3/4] lib: Flush the driver's internal cache of objects before counting Chris Wilson
@ 2017-10-18 12:34 ` Chris Wilson
  2017-10-18 13:03 ` [PATCH igt 1/4] lib: Add DROP_IDLE Joonas Lahtinen
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-10-18 12:34 UTC (permalink / raw)
  To: intel-gfx

Release the internal caches (by flushing the idle_worker) to maximise the
available memory for use by tests (and to reduce sporadic skipping when
on the cusp).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/intel_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/intel_os.c b/lib/intel_os.c
index 6e0a46b3..a77566c1 100644
--- a/lib/intel_os.c
+++ b/lib/intel_os.c
@@ -297,7 +297,7 @@ void intel_purge_vm_caches(int drm_fd)
 {
 	int fd;
 
-	igt_drop_caches_set(drm_fd, DROP_SHRINK_ALL);
+	igt_drop_caches_set(drm_fd, DROP_SHRINK_ALL | DROP_IDLE | DROP_FREED);
 
 	fd = open("/proc/sys/vm/drop_caches", O_WRONLY);
 	if (fd >= 0) {
-- 
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 igt 1/4] lib: Add DROP_IDLE
  2017-10-18 12:34 [PATCH igt 1/4] lib: Add DROP_IDLE Chris Wilson
                   ` (2 preceding siblings ...)
  2017-10-18 12:34 ` [PATCH igt 4/4] lib: Free all internal buffers before measuring available memory Chris Wilson
@ 2017-10-18 13:03 ` Joonas Lahtinen
  2017-10-18 13:04 ` ✓ Fi.CI.BAT: success for series starting with [1/4] " Patchwork
  2017-10-18 22:27 ` ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2017-10-18 13:03 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Wed, 2017-10-18 at 13:34 +0100, Chris Wilson wrote:
> A new flag for an old API; now we can request that the driver flush its
> idle_worker to release internal caches.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Whole series is;

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 series starting with [1/4] lib: Add DROP_IDLE
  2017-10-18 12:34 [PATCH igt 1/4] lib: Add DROP_IDLE Chris Wilson
                   ` (3 preceding siblings ...)
  2017-10-18 13:03 ` [PATCH igt 1/4] lib: Add DROP_IDLE Joonas Lahtinen
@ 2017-10-18 13:04 ` Patchwork
  2017-10-18 22:27 ` ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-10-18 13:04 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/4] lib: Add DROP_IDLE
URL   : https://patchwork.freedesktop.org/series/32211/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
9a3f6f59d4c208219f7d3178106bdef628ff68d0 tests/intel-ci: Remove fast-feedback-simulation.testlist

with latest DRM-Tip kernel build CI_DRM_3258
8b18ad103908 drm-tip: 2017y-10m-18d-08h-27m-31s UTC integration manifest

No testlist changes.

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-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:445s
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:377s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:529s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:266s
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:498s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:495s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:484s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:418s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:250s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:581s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:448s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:427s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:438s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:479s
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:488s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:571s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:477s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:582s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:545s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:461s
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:521s
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:458s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:566s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:423s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_377/
_______________________________________________
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: success for series starting with [1/4] lib: Add DROP_IDLE
  2017-10-18 12:34 [PATCH igt 1/4] lib: Add DROP_IDLE Chris Wilson
                   ` (4 preceding siblings ...)
  2017-10-18 13:04 ` ✓ Fi.CI.BAT: success for series starting with [1/4] " Patchwork
@ 2017-10-18 22:27 ` Patchwork
  5 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-10-18 22:27 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/4] lib: Add DROP_IDLE
URL   : https://patchwork.freedesktop.org/series/32211/
State : success

== Summary ==

Test perf:
        Subgroup polling:
                fail       -> PASS       (shard-hsw) fdo#102252
Test kms_flip:
        Subgroup dpms-vs-vblank-race:
                pass       -> FAIL       (shard-hsw) fdo#103060

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060

shard-hsw        total:2540 pass:1430 dwarn:0   dfail:0   fail:9   skip:1101 time:9244s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_377/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

end of thread, other threads:[~2017-10-18 22:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 12:34 [PATCH igt 1/4] lib: Add DROP_IDLE Chris Wilson
2017-10-18 12:34 ` [PATCH igt 2/4] lib: Idle the GT when quiescing the GPU Chris Wilson
2017-10-18 12:34 ` [PATCH igt 3/4] lib: Flush the driver's internal cache of objects before counting Chris Wilson
2017-10-18 12:34 ` [PATCH igt 4/4] lib: Free all internal buffers before measuring available memory Chris Wilson
2017-10-18 13:03 ` [PATCH igt 1/4] lib: Add DROP_IDLE Joonas Lahtinen
2017-10-18 13:04 ` ✓ Fi.CI.BAT: success for series starting with [1/4] " Patchwork
2017-10-18 22:27 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox