From: Tommi Rantala <tt.rantala@gmail.com>
To: davej@redhat.com
Cc: trinity@vger.kernel.org, Tommi Rantala <tt.rantala@gmail.com>
Subject: [PATCH 2/2] Do not busy loop child processes on startup
Date: Sat, 27 Jul 2013 17:35:16 +0300 [thread overview]
Message-ID: <1374935716-26961-3-git-send-email-tt.rantala@gmail.com> (raw)
In-Reply-To: <1374935716-26961-1-git-send-email-tt.rantala@gmail.com>
Stop busy looping the child processes on trinity startup, so that they
do not compete with the main process for CPU time.
---
main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/main.c b/main.c
index 1401de7..fefc4bf 100644
--- a/main.c
+++ b/main.c
@@ -143,7 +143,8 @@ static void fork_children(void)
}
/* Wait for all the children to start up. */
- while (shm->ready == FALSE);
+ while (shm->ready == FALSE)
+ sleep(1);
init_child(pidslot);
--
1.8.1.2
prev parent reply other threads:[~2013-07-27 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-27 14:35 [PATCH 0/2] misc fixes Tommi Rantala
2013-07-27 14:35 ` [PATCH 1/2] Fix child crash when disabling some syscalls on biarch Tommi Rantala
2013-07-27 14:35 ` Tommi Rantala [this message]
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=1374935716-26961-3-git-send-email-tt.rantala@gmail.com \
--to=tt.rantala@gmail.com \
--cc=davej@redhat.com \
--cc=trinity@vger.kernel.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