public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: adjust the offset of the log statistics line
@ 2023-12-04  7:26 Kunhai Dai
  2023-12-05  1:12 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Kunhai Dai @ 2023-12-04  7:26 UTC (permalink / raw)
  To: chandan.babu, djwong; +Cc: linux-xfs, linux-kernel, Kunhai Dai

It would be more preferable to present xs_try_logspace and
xs_sleep_logspace on the log line.

Signed-off-by: Kunhai Dai <daikunhai@didiglobal.com>
---
 fs/xfs/xfs_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_stats.c b/fs/xfs/xfs_stats.c
index 90a77cd3ebad..92ff3a22cbc9 100644
--- a/fs/xfs/xfs_stats.c
+++ b/fs/xfs/xfs_stats.c
@@ -36,7 +36,7 @@ int xfs_stats_format(struct xfsstats __percpu *stats, char *buf)
 		{ "dir",		xfsstats_offset(xs_trans_sync)	},
 		{ "trans",		xfsstats_offset(xs_ig_attempts)	},
 		{ "ig",			xfsstats_offset(xs_log_writes)	},
-		{ "log",		xfsstats_offset(xs_try_logspace)},
+		{ "log",		xfsstats_offset(xs_push_ail)},
 		{ "push_ail",		xfsstats_offset(xs_xstrat_quick)},
 		{ "xstrat",		xfsstats_offset(xs_write_calls)	},
 		{ "rw",			xfsstats_offset(xs_attr_get)	},
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs: adjust the offset of the log statistics line
  2023-12-04  7:26 [PATCH] xfs: adjust the offset of the log statistics line Kunhai Dai
@ 2023-12-05  1:12 ` Dave Chinner
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Chinner @ 2023-12-05  1:12 UTC (permalink / raw)
  To: Kunhai Dai; +Cc: chandan.babu, djwong, linux-xfs, linux-kernel

On Mon, Dec 04, 2023 at 02:26:44AM -0500, Kunhai Dai wrote:
> It would be more preferable to present xs_try_logspace and
> xs_sleep_logspace on the log line.

xs_try_logspace and xs_sleep_logspace are AIL tail pushing
statistics. They are related to reservation space exhaustion, not
journal operations, so they really are located in the correct stats
namespace. 

Regardless of whether they are correctly located, we can't change
the layout of this file like this - it forms part of the user kABI.
The file format was defined back in June 2000 (early stages of the
XFS port to Linux) and so any change to the layout of the file will
break every application and script every written that parses it.

So while it might be "preferable" to change the order of stats in
the file to group them better, we simply cannot do that because it
will break userspace.

Cheers,

-Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-05  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-04  7:26 [PATCH] xfs: adjust the offset of the log statistics line Kunhai Dai
2023-12-05  1:12 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox