All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child
@ 2019-02-07 21:03 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-02-07 21:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Make sure that the SIGARLM handler is captured so that we don't
accidentally shoot ourselves in the foot instead of merely waking up the
execbuf.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_exec_schedule.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 0462ce84f..d11e57363 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1087,6 +1087,7 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	unsigned int last, count;
 	struct itimerval itv;
 	IGT_CORK_HANDLE(c);
+	uint32_t vip;
 	bool *result;
 
 	result = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
@@ -1101,9 +1102,16 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	execbuf.buffers_ptr = to_user_pointer(&obj[1]);
 	execbuf.buffer_count = 1;
 	execbuf.flags = engine;
+
+	/* Warm up both (hi/lo) contexts */
 	execbuf.rsvd1 = gem_context_create(fd);
-	gem_context_set_priority(fd, execbuf.rsvd1, MIN_PRIO);
+	gem_context_set_priority(fd, execbuf.rsvd1, MAX_PRIO);
+	gem_execbuf(fd, &execbuf);
+	gem_sync(fd, obj[1].handle);
+	vip = execbuf.rsvd1;
 
+	execbuf.rsvd1 = gem_context_create(fd);
+	gem_context_set_priority(fd, execbuf.rsvd1, MIN_PRIO);
 	gem_execbuf(fd, &execbuf);
 	gem_sync(fd, obj[1].handle);
 
@@ -1147,14 +1155,12 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	igt_fork(child, 1) {
 		result[0] = true;
 
-		igt_debug("Creating HP context\n");
-		execbuf.rsvd1 = gem_context_create(fd);
-		gem_context_set_priority(fd, execbuf.rsvd1, MAX_PRIO);
-
+		igt_debug("Waking parent\n");
 		kill(getppid(), SIGALRM);
 		sched_yield();
 		result[1] = true;
 
+		sigaction(SIGALRM, &sa, NULL);
 		itv.it_value.tv_sec = 0;
 		itv.it_value.tv_usec = 10000;
 		setitimer(ITIMER_REAL, &itv, NULL);
@@ -1163,8 +1169,8 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 		 * able to add ourselves to *our* ring without interruption.
 		 */
 		igt_debug("HP child executing\n");
+		execbuf.rsvd1 = vip;
 		result[2] = __execbuf(fd, &execbuf) == 0;
-		gem_context_destroy(fd, execbuf.rsvd1);
 	}
 
 	/* Relinquish CPU just to allow child to create a context */
@@ -1186,6 +1192,7 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	igt_waitchildren();
 
 	gem_context_destroy(fd, execbuf.rsvd1);
+	gem_context_destroy(fd, vip);
 	gem_close(fd, obj[1].handle);
 	gem_close(fd, obj[0].handle);
 	munmap(result, 4096);
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child
@ 2019-02-07 21:03 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-02-07 21:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Make sure that the SIGARLM handler is captured so that we don't
accidentally shoot ourselves in the foot instead of merely waking up the
execbuf.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_exec_schedule.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 0462ce84f..d11e57363 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1087,6 +1087,7 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	unsigned int last, count;
 	struct itimerval itv;
 	IGT_CORK_HANDLE(c);
+	uint32_t vip;
 	bool *result;
 
 	result = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
@@ -1101,9 +1102,16 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	execbuf.buffers_ptr = to_user_pointer(&obj[1]);
 	execbuf.buffer_count = 1;
 	execbuf.flags = engine;
+
+	/* Warm up both (hi/lo) contexts */
 	execbuf.rsvd1 = gem_context_create(fd);
-	gem_context_set_priority(fd, execbuf.rsvd1, MIN_PRIO);
+	gem_context_set_priority(fd, execbuf.rsvd1, MAX_PRIO);
+	gem_execbuf(fd, &execbuf);
+	gem_sync(fd, obj[1].handle);
+	vip = execbuf.rsvd1;
 
+	execbuf.rsvd1 = gem_context_create(fd);
+	gem_context_set_priority(fd, execbuf.rsvd1, MIN_PRIO);
 	gem_execbuf(fd, &execbuf);
 	gem_sync(fd, obj[1].handle);
 
@@ -1147,14 +1155,12 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	igt_fork(child, 1) {
 		result[0] = true;
 
-		igt_debug("Creating HP context\n");
-		execbuf.rsvd1 = gem_context_create(fd);
-		gem_context_set_priority(fd, execbuf.rsvd1, MAX_PRIO);
-
+		igt_debug("Waking parent\n");
 		kill(getppid(), SIGALRM);
 		sched_yield();
 		result[1] = true;
 
+		sigaction(SIGALRM, &sa, NULL);
 		itv.it_value.tv_sec = 0;
 		itv.it_value.tv_usec = 10000;
 		setitimer(ITIMER_REAL, &itv, NULL);
@@ -1163,8 +1169,8 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 		 * able to add ourselves to *our* ring without interruption.
 		 */
 		igt_debug("HP child executing\n");
+		execbuf.rsvd1 = vip;
 		result[2] = __execbuf(fd, &execbuf) == 0;
-		gem_context_destroy(fd, execbuf.rsvd1);
 	}
 
 	/* Relinquish CPU just to allow child to create a context */
@@ -1186,6 +1192,7 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	igt_waitchildren();
 
 	gem_context_destroy(fd, execbuf.rsvd1);
+	gem_context_destroy(fd, vip);
 	gem_close(fd, obj[1].handle);
 	gem_close(fd, obj[0].handle);
 	munmap(result, 4096);
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_exec_schedule: Rebuild signal handler in child
  2019-02-07 21:03 ` [igt-dev] " Chris Wilson
  (?)
@ 2019-02-07 21:47 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-02-07 21:47 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_exec_schedule: Rebuild signal handler in child
URL   : https://patchwork.freedesktop.org/series/56366/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5563 -> IGTPW_2358
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56366/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@cs-compute:
    - fi-kbl-8809g:       NOTRUN -> FAIL [fdo#108094]

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       PASS -> FAIL [fdo#109485]

  
#### Possible fixes ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-kbl-8809g:       DMESG-WARN [fdo#108965] -> PASS

  * igt@pm_rpm@basic-pci-d3-state:
    - fi-byt-n2820:       {SKIP} [fdo#109271] -> PASS

  * igt@pm_rpm@basic-rte:
    - fi-byt-n2820:       FAIL [fdo#108800] -> PASS

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

  [fdo#105998]: https://bugs.freedesktop.org/show_bug.cgi?id=105998
  [fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
  [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
  [fdo#109527]: https://bugs.freedesktop.org/show_bug.cgi?id=109527
  [fdo#109528]: https://bugs.freedesktop.org/show_bug.cgi?id=109528
  [fdo#109530]: https://bugs.freedesktop.org/show_bug.cgi?id=109530


Participating hosts (47 -> 42)
------------------------------

  Additional (2): fi-icl-y fi-skl-6700hq 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-pnv-d510 


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

    * IGT: IGT_4813 -> IGTPW_2358

  CI_DRM_5563: 5a4e90aa52dbfcb1960afca7c2ba59a5ce913906 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2358: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2358/
  IGT_4813: 09f506726d0e115ee7f4a1604ae71adcf9f12690 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2358/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_exec_schedule: Rebuild signal handler in child
  2019-02-07 21:03 ` [igt-dev] " Chris Wilson
  (?)
  (?)
@ 2019-02-08  0:06 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-02-08  0:06 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_exec_schedule: Rebuild signal handler in child
URL   : https://patchwork.freedesktop.org/series/56366/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5563_full -> IGTPW_2358_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56366/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_fence_thrash@bo-write-verify-threaded-y:
    - shard-apl:          PASS -> INCOMPLETE [fdo#103927]

  * igt@kms_available_modes_crc@available_mode_test_crc:
    - shard-apl:          PASS -> FAIL [fdo#106641]
    - shard-glk:          PASS -> FAIL [fdo#106641]
    - shard-kbl:          PASS -> FAIL [fdo#106641]

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_cursor_crc@cursor-128x42-sliding:
    - shard-apl:          PASS -> FAIL [fdo#103232] +2

  * igt@kms_cursor_crc@cursor-256x85-onscreen:
    - shard-glk:          PASS -> FAIL [fdo#103232] +3

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-glk:          PASS -> FAIL [fdo#103167] +6
    - shard-apl:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-kbl:          PASS -> FAIL [fdo#103167] / [fdo#105682]

  * igt@kms_plane@plane-position-covered-pipe-a-planes:
    - shard-glk:          PASS -> FAIL [fdo#103166] +4
    - shard-apl:          PASS -> FAIL [fdo#103166] +2

  * igt@kms_plane_alpha_blend@pipe-a-alpha-transparant-fb:
    - shard-glk:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
    - shard-glk:          PASS -> FAIL [fdo#108145] +2

  * igt@kms_plane_lowres@pipe-a-tiling-y:
    - shard-kbl:          PASS -> FAIL [fdo#103166] +1

  * igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
    - shard-glk:          PASS -> DMESG-FAIL [fdo#105763] / [fdo#106538]

  * igt@kms_setmode@basic:
    - shard-kbl:          PASS -> FAIL [fdo#99912]

  * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
    - shard-kbl:          PASS -> INCOMPLETE [fdo#103665]

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@vcs0-s3:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * igt@gem_tiled_blits@interruptible:
    - shard-hsw:          INCOMPLETE [fdo#103540] -> PASS +1

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-glk:          FAIL [fdo#103232] -> PASS
    - shard-apl:          FAIL [fdo#103191] / [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-64x64-sliding:
    - shard-apl:          FAIL [fdo#103232] -> PASS +1
    - shard-kbl:          FAIL [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-alpha-opaque:
    - shard-apl:          FAIL [fdo#109350] -> PASS
    - shard-glk:          FAIL [fdo#109350] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
    - shard-apl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
    - shard-glk:          FAIL [fdo#103167] -> PASS +1

  * igt@kms_plane@plane-position-covered-pipe-c-planes:
    - shard-apl:          FAIL [fdo#103166] -> PASS +3

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-glk:          FAIL [fdo#108145] -> PASS

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-glk:          FAIL [fdo#103166] -> PASS

  * igt@kms_universal_plane@universal-plane-pipe-a-functional:
    - shard-kbl:          FAIL [fdo#103166] -> PASS

  * igt@tools_test@tools_test:
    - shard-kbl:          {SKIP} [fdo#109271] -> PASS

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

  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
  [fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


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

  Missing    (2): shard-skl shard-iclb 


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

    * IGT: IGT_4813 -> IGTPW_2358
    * Piglit: piglit_4509 -> None

  CI_DRM_5563: 5a4e90aa52dbfcb1960afca7c2ba59a5ce913906 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2358: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2358/
  IGT_4813: 09f506726d0e115ee7f4a1604ae71adcf9f12690 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2358/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child
  2019-02-07 21:03 ` [igt-dev] " Chris Wilson
@ 2019-02-08  8:59   ` Joonas Lahtinen
  -1 siblings, 0 replies; 10+ messages in thread
From: Joonas Lahtinen @ 2019-02-08  8:59 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev

Quoting Chris Wilson (2019-02-07 23:03:08)
> Make sure that the SIGARLM handler is captured so that we don't
> accidentally shoot ourselves in the foot instead of merely waking up the
> execbuf.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Warming up the context ahead of time is reasonable for super low SKUs.

But the SIGALRM handler should be inherted, so that's a red herring.

With the commit message and title adjusted for warming up the context:

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas

> ---
>  tests/i915/gem_exec_schedule.c | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
> index 0462ce84f..d11e57363 100644
> --- a/tests/i915/gem_exec_schedule.c
> +++ b/tests/i915/gem_exec_schedule.c
> @@ -1087,6 +1087,7 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>         unsigned int last, count;
>         struct itimerval itv;
>         IGT_CORK_HANDLE(c);
> +       uint32_t vip;
>         bool *result;
>  
>         result = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
> @@ -1101,9 +1102,16 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>         execbuf.buffers_ptr = to_user_pointer(&obj[1]);
>         execbuf.buffer_count = 1;
>         execbuf.flags = engine;
> +
> +       /* Warm up both (hi/lo) contexts */
>         execbuf.rsvd1 = gem_context_create(fd);
> -       gem_context_set_priority(fd, execbuf.rsvd1, MIN_PRIO);
> +       gem_context_set_priority(fd, execbuf.rsvd1, MAX_PRIO);
> +       gem_execbuf(fd, &execbuf);
> +       gem_sync(fd, obj[1].handle);
> +       vip = execbuf.rsvd1;
>  
> +       execbuf.rsvd1 = gem_context_create(fd);
> +       gem_context_set_priority(fd, execbuf.rsvd1, MIN_PRIO);
>         gem_execbuf(fd, &execbuf);
>         gem_sync(fd, obj[1].handle);
>  
> @@ -1147,14 +1155,12 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>         igt_fork(child, 1) {
>                 result[0] = true;
>  
> -               igt_debug("Creating HP context\n");
> -               execbuf.rsvd1 = gem_context_create(fd);
> -               gem_context_set_priority(fd, execbuf.rsvd1, MAX_PRIO);
> -
> +               igt_debug("Waking parent\n");
>                 kill(getppid(), SIGALRM);
>                 sched_yield();
>                 result[1] = true;
>  
> +               sigaction(SIGALRM, &sa, NULL);
>                 itv.it_value.tv_sec = 0;
>                 itv.it_value.tv_usec = 10000;
>                 setitimer(ITIMER_REAL, &itv, NULL);
> @@ -1163,8 +1169,8 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>                  * able to add ourselves to *our* ring without interruption.
>                  */
>                 igt_debug("HP child executing\n");
> +               execbuf.rsvd1 = vip;
>                 result[2] = __execbuf(fd, &execbuf) == 0;
> -               gem_context_destroy(fd, execbuf.rsvd1);
>         }
>  
>         /* Relinquish CPU just to allow child to create a context */
> @@ -1186,6 +1192,7 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>         igt_waitchildren();
>  
>         gem_context_destroy(fd, execbuf.rsvd1);
> +       gem_context_destroy(fd, vip);
>         gem_close(fd, obj[1].handle);
>         gem_close(fd, obj[0].handle);
>         munmap(result, 4096);
> -- 
> 2.20.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child
@ 2019-02-08  8:59   ` Joonas Lahtinen
  0 siblings, 0 replies; 10+ messages in thread
From: Joonas Lahtinen @ 2019-02-08  8:59 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev

Quoting Chris Wilson (2019-02-07 23:03:08)
> Make sure that the SIGARLM handler is captured so that we don't
> accidentally shoot ourselves in the foot instead of merely waking up the
> execbuf.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Warming up the context ahead of time is reasonable for super low SKUs.

But the SIGALRM handler should be inherted, so that's a red herring.

With the commit message and title adjusted for warming up the context:

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas

> ---
>  tests/i915/gem_exec_schedule.c | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
> index 0462ce84f..d11e57363 100644
> --- a/tests/i915/gem_exec_schedule.c
> +++ b/tests/i915/gem_exec_schedule.c
> @@ -1087,6 +1087,7 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>         unsigned int last, count;
>         struct itimerval itv;
>         IGT_CORK_HANDLE(c);
> +       uint32_t vip;
>         bool *result;
>  
>         result = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
> @@ -1101,9 +1102,16 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>         execbuf.buffers_ptr = to_user_pointer(&obj[1]);
>         execbuf.buffer_count = 1;
>         execbuf.flags = engine;
> +
> +       /* Warm up both (hi/lo) contexts */
>         execbuf.rsvd1 = gem_context_create(fd);
> -       gem_context_set_priority(fd, execbuf.rsvd1, MIN_PRIO);
> +       gem_context_set_priority(fd, execbuf.rsvd1, MAX_PRIO);
> +       gem_execbuf(fd, &execbuf);
> +       gem_sync(fd, obj[1].handle);
> +       vip = execbuf.rsvd1;
>  
> +       execbuf.rsvd1 = gem_context_create(fd);
> +       gem_context_set_priority(fd, execbuf.rsvd1, MIN_PRIO);
>         gem_execbuf(fd, &execbuf);
>         gem_sync(fd, obj[1].handle);
>  
> @@ -1147,14 +1155,12 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>         igt_fork(child, 1) {
>                 result[0] = true;
>  
> -               igt_debug("Creating HP context\n");
> -               execbuf.rsvd1 = gem_context_create(fd);
> -               gem_context_set_priority(fd, execbuf.rsvd1, MAX_PRIO);
> -
> +               igt_debug("Waking parent\n");
>                 kill(getppid(), SIGALRM);
>                 sched_yield();
>                 result[1] = true;
>  
> +               sigaction(SIGALRM, &sa, NULL);
>                 itv.it_value.tv_sec = 0;
>                 itv.it_value.tv_usec = 10000;
>                 setitimer(ITIMER_REAL, &itv, NULL);
> @@ -1163,8 +1169,8 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>                  * able to add ourselves to *our* ring without interruption.
>                  */
>                 igt_debug("HP child executing\n");
> +               execbuf.rsvd1 = vip;
>                 result[2] = __execbuf(fd, &execbuf) == 0;
> -               gem_context_destroy(fd, execbuf.rsvd1);
>         }
>  
>         /* Relinquish CPU just to allow child to create a context */
> @@ -1186,6 +1192,7 @@ static void test_pi_ringfull(int fd, unsigned int engine)
>         igt_waitchildren();
>  
>         gem_context_destroy(fd, execbuf.rsvd1);
> +       gem_context_destroy(fd, vip);
>         gem_close(fd, obj[1].handle);
>         gem_close(fd, obj[0].handle);
>         munmap(result, 4096);
> -- 
> 2.20.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child
  2019-02-08  8:59   ` Joonas Lahtinen
@ 2019-02-08  9:01     ` Chris Wilson
  -1 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-02-08  9:01 UTC (permalink / raw)
  To: Joonas Lahtinen, intel-gfx; +Cc: igt-dev

Quoting Joonas Lahtinen (2019-02-08 08:59:53)
> Quoting Chris Wilson (2019-02-07 23:03:08)
> > Make sure that the SIGARLM handler is captured so that we don't
> > accidentally shoot ourselves in the foot instead of merely waking up the
> > execbuf.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> Warming up the context ahead of time is reasonable for super low SKUs.
> 
> But the SIGALRM handler should be inherted, so that's a red herring.

It wasn't.

	child 0 died with signal 14, Alarm clock

-> hit SIG_DFL
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child
@ 2019-02-08  9:01     ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-02-08  9:01 UTC (permalink / raw)
  To: Joonas Lahtinen, intel-gfx; +Cc: igt-dev

Quoting Joonas Lahtinen (2019-02-08 08:59:53)
> Quoting Chris Wilson (2019-02-07 23:03:08)
> > Make sure that the SIGARLM handler is captured so that we don't
> > accidentally shoot ourselves in the foot instead of merely waking up the
> > execbuf.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> Warming up the context ahead of time is reasonable for super low SKUs.
> 
> But the SIGALRM handler should be inherted, so that's a red herring.

It wasn't.

	child 0 died with signal 14, Alarm clock

-> hit SIG_DFL
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child
  2019-02-08  9:01     ` Chris Wilson
@ 2019-02-08  9:54       ` Joonas Lahtinen
  -1 siblings, 0 replies; 10+ messages in thread
From: Joonas Lahtinen @ 2019-02-08  9:54 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev

+ Petri for the fact that igt_fork is actually igt_forkoontula and
messes up set up signal handlers when transitioning to child.

Quoting Chris Wilson (2019-02-08 11:01:55)
> Quoting Joonas Lahtinen (2019-02-08 08:59:53)
> > Quoting Chris Wilson (2019-02-07 23:03:08)
> > > Make sure that the SIGARLM handler is captured so that we don't
> > > accidentally shoot ourselves in the foot instead of merely waking up the
> > > execbuf.
> > > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > 
> > Warming up the context ahead of time is reasonable for super low SKUs.
> > 
> > But the SIGALRM handler should be inherted, so that's a red herring.
> 
> It wasn't.
> 
>         child 0 died with signal 14, Alarm clock

Ugh, I'm just running a miniature version locally and it *does* get
inherited here.

Add a big fat "/* FIXME: IGT should not mess the SIGALRM handler */"
above the line, and keep the R-b, then.

Regards, Joonas

> 
> -> hit SIG_DFL
> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child
@ 2019-02-08  9:54       ` Joonas Lahtinen
  0 siblings, 0 replies; 10+ messages in thread
From: Joonas Lahtinen @ 2019-02-08  9:54 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev, Petri Latvala

+ Petri for the fact that igt_fork is actually igt_forkoontula and
messes up set up signal handlers when transitioning to child.

Quoting Chris Wilson (2019-02-08 11:01:55)
> Quoting Joonas Lahtinen (2019-02-08 08:59:53)
> > Quoting Chris Wilson (2019-02-07 23:03:08)
> > > Make sure that the SIGARLM handler is captured so that we don't
> > > accidentally shoot ourselves in the foot instead of merely waking up the
> > > execbuf.
> > > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > 
> > Warming up the context ahead of time is reasonable for super low SKUs.
> > 
> > But the SIGALRM handler should be inherted, so that's a red herring.
> 
> It wasn't.
> 
>         child 0 died with signal 14, Alarm clock

Ugh, I'm just running a miniature version locally and it *does* get
inherited here.

Add a big fat "/* FIXME: IGT should not mess the SIGALRM handler */"
above the line, and keep the R-b, then.

Regards, Joonas

> 
> -> hit SIG_DFL
> -Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-02-08  9:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-07 21:03 [PATCH i-g-t] i915/gem_exec_schedule: Rebuild signal handler in child Chris Wilson
2019-02-07 21:03 ` [igt-dev] " Chris Wilson
2019-02-07 21:47 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-08  0:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-08  8:59 ` [igt-dev] [PATCH i-g-t] " Joonas Lahtinen
2019-02-08  8:59   ` Joonas Lahtinen
2019-02-08  9:01   ` Chris Wilson
2019-02-08  9:01     ` Chris Wilson
2019-02-08  9:54     ` Joonas Lahtinen
2019-02-08  9:54       ` Joonas Lahtinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.