public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@intel.com>
Subject: [IGT PATCH 2/2] aux: Use IGT version of system() call to run rtcwake
Date: Thu, 12 Oct 2017 16:22:07 +0300	[thread overview]
Message-ID: <20171012132207.27508-2-imre.deak@intel.com> (raw)
In-Reply-To: <20171012132207.27508-1-imre.deak@intel.com>

The clone() system call has difficulty to make progress if interrupted
frequently by the signal helper process. At least on an APL, like in the
Bugzilla ticket below, this can introduce minutes of overhead to a
single system() call (leading to a global CI timeout). To get rid of the
overhead suspend the signal helper process for the duration of the
system() call, which is provided already by igt_system().

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103160
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 lib/igt_aux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 36dfab43..a1c5e2cf 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -794,7 +794,7 @@ static void suspend_via_rtcwake(enum igt_suspend_state state)
 	 */
 	snprintf(cmd, sizeof(cmd), "rtcwake -n -s %d -m %s " SQUELCH,
 		 delay, suspend_state_name[state]);
-	ret = system(cmd);
+	ret = igt_system(cmd);
 	igt_require_f(ret == 0, "rtcwake test failed with %i\n"
 		     "This failure could mean that something is wrong with "
 		     "the rtcwake tool or how your distro is set up.\n",
@@ -802,7 +802,7 @@ static void suspend_via_rtcwake(enum igt_suspend_state state)
 
 	snprintf(cmd, sizeof(cmd), "rtcwake -s %d -m %s ",
 		 delay, suspend_state_name[state]);
-	ret = system(cmd);
+	ret = igt_system(cmd);
 	igt_assert_f(ret == 0,
 		     "rtcwake failed with %i\n"
 		     "Check dmesg for further details.\n",
-- 
2.13.2

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

  reply	other threads:[~2017-10-12 13:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 13:22 [IGT PATCH 1/2] aux: Suspend signal helper for shell commands Imre Deak
2017-10-12 13:22 ` Imre Deak [this message]
2017-10-12 13:57   ` [IGT PATCH 2/2] aux: Use IGT version of system() call to run rtcwake Chris Wilson
2017-10-12 13:51 ` [IGT PATCH 1/2] aux: Suspend signal helper for shell commands Chris Wilson
2017-10-12 13:52 ` Chris Wilson
2017-10-13 11:22   ` Imre Deak
2017-10-12 17:52 ` Daniel Vetter

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=20171012132207.27508-2-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=daniel.vetter@intel.com \
    --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