From: jeffm@suse.com
To: linux-xfs@vger.kernel.org
Cc: Jeff Mahoney <jeffm@suse.com>
Subject: [PATCH 2/3] xfs_repair: add prefetch trace calls to debug thread creation failures
Date: Mon, 16 Jan 2017 23:39:32 -0500 [thread overview]
Message-ID: <1484627973-11535-3-git-send-email-jeffm@suse.com> (raw)
In-Reply-To: <1484627973-11535-1-git-send-email-jeffm@suse.com>
From: Jeff Mahoney <jeffm@suse.com>
When debugging prefetch failures, it's useful to have thread creation
failure messages that are output as warnings on stderr in the trace
log as well. It's also helpful to see when an AG gets queued behind
another one rather than having the thread started directly, which
has a separate trace line.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
repair/prefetch.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/repair/prefetch.c b/repair/prefetch.c
index 044fab2..37d60d6 100644
--- a/repair/prefetch.c
+++ b/repair/prefetch.c
@@ -703,6 +703,8 @@ pf_queuing_worker(
if (err != 0) {
do_warn(_("failed to create prefetch thread: %s\n"),
strerror(err));
+ pftrace("failed to create prefetch thread for AG %d: %s",
+ args->agno, strerror(err));
args->io_threads[i] = 0;
if (i == 0) {
pf_start_processing(args);
@@ -817,6 +819,8 @@ pf_create_prefetch_thread(
if (err != 0) {
do_warn(_("failed to create prefetch thread: %s\n"),
strerror(err));
+ pftrace("failed to create prefetch thread for AG %d: %s",
+ args->agno, strerror(err));
args->queuing_thread = 0;
cleanup_inode_prefetch(args);
}
@@ -882,8 +886,11 @@ start_inode_prefetch(
if (prev_args->prefetch_done) {
if (!pf_create_prefetch_thread(args))
args = NULL;
- } else
+ } else {
prev_args->next_args = args;
+ pftrace("queued AG %d after AG %d",
+ args->agno, prev_args->agno);
+ }
pthread_mutex_unlock(&prev_args->lock);
}
--
2.7.1
next prev parent reply other threads:[~2017-01-17 4:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 4:39 [PATCH 0/3] xfs_repair: pthread creation failure recovery fixes jeffm
2017-01-17 4:39 ` [PATCH 1/3] xfs_repair: clear pthread_t when pthread_create fails jeffm
2017-06-15 19:11 ` Eric Sandeen
2017-01-17 4:39 ` jeffm [this message]
2017-06-15 19:11 ` [PATCH 2/3] xfs_repair: add prefetch trace calls to debug thread creation failures Eric Sandeen
2017-01-17 4:39 ` [PATCH 3/3] xfs_repair: fix thread creation failure recovery jeffm
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=1484627973-11535-3-git-send-email-jeffm@suse.com \
--to=jeffm@suse.com \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).