From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [RFCv2 8/9] xfs: add a runtime stat for extra transaction log regrants
Date: Wed, 24 Jan 2018 13:44:17 -0500 [thread overview]
Message-ID: <20180124184418.40403-9-bfoster@redhat.com> (raw)
In-Reply-To: <20180124184418.40403-1-bfoster@redhat.com>
Add a runtime stat to track the number of regrants that occur that
were not satisfied by the initial transaction reservation (i.e.,
->tr_logcount), regardless of whether blocking for reservation was
required. The purpose of this stat is to help shed some light on how
certain transaction changes may affect runtime behavior. For example,
deferring AGFL block frees can cause an additional transaction rolls
in cases where it is enabled. The regrant stat helps track how this
behavior affects workloads and to consider whether to update
transaction reservation counts.
Update the tail pushing section of the stats structure with the new
field since it already includes a couple other logspace-related
stats. Add the new stat at the end to minimize compatibility issues
with any stats-parsing scripts, etc. that may exist out in the wild.
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
fs/xfs/xfs_log.c | 1 +
fs/xfs/xfs_stats.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index c1f266c34af7..0efe2af7e4fe 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -399,6 +399,7 @@ xfs_log_regrant(
return 0;
trace_xfs_log_regrant(log, tic);
+ XFS_STATS_INC(mp, xs_regrant_logspace);
error = xlog_grant_head_check(log, &log->l_write_head, tic,
&need_bytes);
diff --git a/fs/xfs/xfs_stats.h b/fs/xfs/xfs_stats.h
index f64d0ae345c4..76c6c099b65e 100644
--- a/fs/xfs/xfs_stats.h
+++ b/fs/xfs/xfs_stats.h
@@ -99,7 +99,7 @@ struct __xfsstats {
uint32_t xs_log_noiclogs;
uint32_t xs_log_force;
uint32_t xs_log_force_sleep;
-# define XFSSTAT_END_TAIL_PUSHING (XFSSTAT_END_LOG_OPS+10)
+# define XFSSTAT_END_TAIL_PUSHING (XFSSTAT_END_LOG_OPS+11)
uint32_t xs_try_logspace;
uint32_t xs_sleep_logspace;
uint32_t xs_push_ail;
@@ -110,6 +110,7 @@ struct __xfsstats {
uint32_t xs_push_ail_flushing;
uint32_t xs_push_ail_restarts;
uint32_t xs_push_ail_flush;
+ uint32_t xs_regrant_logspace;
# define XFSSTAT_END_WRITE_CONVERT (XFSSTAT_END_TAIL_PUSHING+2)
uint32_t xs_xstrat_quick;
uint32_t xs_xstrat_split;
--
2.13.6
next prev parent reply other threads:[~2018-01-24 18:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 18:44 [RFCv2 0/9] xfs: defer agfl block frees Brian Foster
2018-01-24 18:44 ` [RFCv2 1/9] xfs: create agfl block free helper function Brian Foster
2018-01-24 18:44 ` [RFCv2 2/9] xfs: allow attach of dfops to transaction Brian Foster
2018-01-24 18:44 ` [RFCv2 3/9] xfs: defer agfl block frees when dfops is available Brian Foster
2018-01-24 18:44 ` [RFCv2 4/9] xfs: defer agfl block frees from deferred ops processing context Brian Foster
2018-01-24 18:44 ` [RFCv2 5/9] xfs: defer agfl frees from inode inactivation Brian Foster
2018-01-24 18:44 ` [RFCv2 6/9] xfs: defer frees from common inode allocation paths Brian Foster
2018-01-24 18:44 ` [RFCv2 7/9] xfs: defer agfl frees from directory op transactions Brian Foster
2018-01-24 18:44 ` Brian Foster [this message]
2018-01-24 18:44 ` [RFCv2 9/9] xfs: add extra log count for transactions that defer agfl frees Brian Foster
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=20180124184418.40403-9-bfoster@redhat.com \
--to=bfoster@redhat.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