aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2019-12-12 19:54:33 -0500
committerEric Sandeen <sandeen@redhat.com>2019-12-12 19:54:33 -0500
commit74945501524d393ab5b3b78179f03a44ab9691c3 (patch)
treea7d6e2cda7af48146bf69ce4f1cc6ea0b72a27fb
parent6cd1e6dbdc8c03f4bfb573e4cecf3b211ef90793 (diff)
downloadxfsprogs-dev-74945501524d393ab5b3b78179f03a44ab9691c3.tar.gz
xfs: add kmem allocation trace points
Source kernel commit: 0ad95687c3adb91e762d0f6ea50a6b1137300e19 When trying to correlate XFS kernel allocations to memory reclaim behaviour, it is useful to know what allocations XFS is actually attempting. This information is not directly available from tracepoints in the generic memory allocation and reclaim tracepoints, so these new trace points provide a high level indication of what the XFS memory demand actually is. There is no per-filesystem context in this code, so we just trace the type of allocation, the size and the allocation constraints. The kmem code also doesn't include much of the common XFS headers, so there are a few definitions that need to be added to the trace headers and a couple of types that need to be made common to avoid needing to include the whole world in the kmem code. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--include/xfs_mount.h8
-rw-r--r--libxfs/xfs_types.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/include/xfs_mount.h b/include/xfs_mount.h
index 5c182f03fc..efbf3aff94 100644
--- a/include/xfs_mount.h
+++ b/include/xfs_mount.h
@@ -109,14 +109,6 @@ typedef struct xfs_mount {
#define M_IGEO(mp) (&(mp)->m_ino_geo)
-/* per-AG block reservation data structures*/
-enum xfs_ag_resv_type {
- XFS_AG_RESV_NONE = 0,
- XFS_AG_RESV_AGFL,
- XFS_AG_RESV_METADATA,
- XFS_AG_RESV_RMAPBT,
-};
-
struct xfs_ag_resv {
/* number of blocks originally reserved here */
xfs_extlen_t ar_orig_reserved;
diff --git a/libxfs/xfs_types.h b/libxfs/xfs_types.h
index 802b34cd10..300b3e91ca 100644
--- a/libxfs/xfs_types.h
+++ b/libxfs/xfs_types.h
@@ -169,6 +169,14 @@ typedef struct xfs_bmbt_irec
xfs_exntst_t br_state; /* extent state */
} xfs_bmbt_irec_t;
+/* per-AG block reservation types */
+enum xfs_ag_resv_type {
+ XFS_AG_RESV_NONE = 0,
+ XFS_AG_RESV_AGFL,
+ XFS_AG_RESV_METADATA,
+ XFS_AG_RESV_RMAPBT,
+};
+
/*
* Type verifier functions
*/