summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2025-03-10 14:19:15 +0100
committerCarlos Maiolino <cem@kernel.org>2025-03-10 14:29:44 +0100
commit89ce287c83c91f5d222809b82e597426587a862d (patch)
tree115b59274cd822d83b02079eea45cd238b9e2f13 /fs/xfs/xfs_buf.c
parente614a00117bc2d46219c66a287ddde0f0a04517c (diff)
xfs: trace what memory backs a buffer
Add three trace points for the different backing memory allocators for buffers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index a7430fcd8301..106ee81fa56f 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -240,6 +240,7 @@ xfs_buf_alloc_kmem(
return -ENOMEM;
}
bp->b_flags |= _XBF_KMEM;
+ trace_xfs_buf_backing_kmem(bp, _RET_IP_);
return 0;
}
@@ -319,9 +320,11 @@ xfs_buf_alloc_backing_mem(
if (!folio) {
if (size <= PAGE_SIZE)
return -ENOMEM;
+ trace_xfs_buf_backing_fallback(bp, _RET_IP_);
goto fallback;
}
bp->b_addr = folio_address(folio);
+ trace_xfs_buf_backing_folio(bp, _RET_IP_);
return 0;
fallback:
@@ -335,6 +338,7 @@ fallback:
memalloc_retry_wait(gfp_mask);
}
+ trace_xfs_buf_backing_vmalloc(bp, _RET_IP_);
return 0;
}