From: Daniel Santos <daniel.santos@pobox.com>
To: cygwin@cygwin.com
Subject: Re: long I/O delays when strace is running
Date: Fri, 21 Apr 2017 11:06:00 -0000 [thread overview]
Message-ID: <bff9c5ea-85d9-bf4e-2f25-271c1490565f@pobox.com> (raw)
In-Reply-To: <ace81c86-80d5-bef9-6b93-7d36dde5a4e8@pobox.com>
I've tracked it down to this little Sleep() loop in pinfo::init.
bool created = shloc != SH_JUSTOPEN;
/* Detect situation where a transitional memory block is being
retrieved.
If the block has been allocated with PINFO_REDIR_SIZE but not yet
updated with a PID_EXECED state then we'll retry. */
if (!created && !(flag & PID_NEW))
/* If not populated, wait 2 seconds for procinfo to become populated.
Would like to wait with finer granularity but that is not easily
doable. */
for (int i = 0; i < 200 && !procinfo->ppid; i++)
Sleep (10);
I tried putting a stupid memory barrier in the loop and a volatile read
just for kicks, but that doesn't seem to be the problem. I'm headed off
to bed. This only happens when using strace, so if anybody has ideas
please post.
Daniel
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2017-04-21 5:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 18:13 Daniel Santos
2017-04-21 0:11 ` Gluszczak, Glenn
2017-04-21 7:57 ` Daniel Santos
2017-04-21 9:38 ` Daniel Santos
2017-04-21 11:06 ` Daniel Santos [this message]
2017-04-21 12:08 ` Mark Geisert
2017-04-21 18:23 ` Daniel Santos
2017-04-22 15:24 ` Mark Geisert
2017-04-23 12:58 ` Daniel Santos
2017-04-23 18:15 ` Mark Geisert
2017-04-24 8:23 ` Daniel Santos
2017-04-24 9:24 ` Daniel Santos
2017-04-24 9:34 ` Mark Geisert
2017-04-24 15:00 ` Daniel Santos
2017-04-24 19:30 ` Daniel Santos
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=bff9c5ea-85d9-bf4e-2f25-271c1490565f@pobox.com \
--to=daniel.santos@pobox.com \
--cc=cygwin@cygwin.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).