From: Chuansheng Liu <chuansheng.liu@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2] i915/pm_rps: install SIGTERM handler for load_helper process
Date: Wed, 20 Nov 2019 06:29:12 +0000 [thread overview]
Message-ID: <20191120062912.10853-1-chuansheng.liu@intel.com> (raw)
Reference:
https://bugs.freedesktop.org/show_bug.cgi?id=112126
The issue we hit is the GPU keeps very high load after running
the subtest min-max-config-loaded.
Some background of the issue:
Currently the rps is not fully enabled yet on TGL, and running
the subtest min-max-config-loaded will hit below assertion:
==
(i915_pm_rps:1261) CRITICAL: Test assertion failure function loaded_check, file ../tests/i915/i915_pm_rps.c:505:
(i915_pm_rps:1261) CRITICAL: Failed assertion: freqs[MAX] <= freqs[CUR]
(i915_pm_rps:1261) CRITICAL: Last errno: 2, No such file or directory
==
with igt stress test, we find the GT keeps busy after running
this subtest, it is due to the igt_spin_end() is not called
randomly.
The root cause analysis is:
When the main process i915_pm_rps for running the subtest
min-max-config-loaded hits the assertion, the main process will
try to send signal SIGTERM to the child process loader_helper
which is created by main process for starting GT load, then the
main process itself will exit.
The SIGTERM handler for loader_helper is the default one, which
will cause the loader_helper exits directly. That is unsafe, we
always expect the igt_spin_end() is called before loader_helper
process exits, which is used to stop the load of GT.
Furthermore, in normal scenario, before main process exits,
it will send SIGUSR1 to child process for stopping GT loading
in safe way.
So here we install the proper handler for signal SIGTERM in the
similar way. Without this patch, the GT may keep busy after
running this subtest. Enabling rps should be tracked on the
other side.
Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
---
tests/i915/i915_pm_rps.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/i915/i915_pm_rps.c b/tests/i915/i915_pm_rps.c
index ef627c0b..8c71c1a1 100644
--- a/tests/i915/i915_pm_rps.c
+++ b/tests/i915/i915_pm_rps.c
@@ -252,6 +252,7 @@ static void load_helper_run(enum load load)
signal(SIGUSR1, load_helper_signal_handler);
signal(SIGUSR2, load_helper_signal_handler);
+ signal(SIGTERM, load_helper_signal_handler);
igt_debug("Applying %s load...\n", lh.load ? "high" : "low");
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-11-20 6:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 6:29 Chuansheng Liu [this message]
2019-11-20 7:13 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/pm_rps: install SIGTERM handler for load_helper process Patchwork
2019-11-20 12:30 ` [igt-dev] [Intel-gfx] [PATCH i-g-t v2] " Chris Wilson
2019-11-21 1:34 ` Liu, Chuansheng
2019-11-21 7:47 ` Chris Wilson
2019-11-21 8:19 ` Liu, Chuansheng
2019-11-20 19:24 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191120062912.10853-1-chuansheng.liu@intel.com \
--to=chuansheng.liu@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox