]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: add kmem allocation trace points
authorDave Chinner <dchinner@redhat.com>
Mon, 26 Aug 2019 19:08:10 +0000 (12:08 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 27 Aug 2019 00:43:14 +0000 (17:43 -0700)
commitb63941a61ae03dc128a0b2b46263e6c51d7e02d9
treea33169d2ece48bf10a82e6d04b824eb58c648e94
parent1ee9d0743732a51e6f7f91d8cb59c8d5cb96b070
xfs: add kmem allocation trace points

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>
fs/xfs/kmem.c
fs/xfs/libxfs/xfs_types.h
fs/xfs/xfs_mount.h
fs/xfs/xfs_trace.h