regmap: async: Add tracepoints for async I/O
Subsystems (3)
PATCH 1/1 regmap: async: Add tracepoints for async I/O
Trace when we start and complete async writes, and when we start and finish blocking for their completion. This is useful for performance analysis of the resulting I/O patterns.
Signed-off-by Mark Brown <[email protected]>
--- drivers/base/regmap/regmap.c | 8 +++++++ include/trace/events/regmap.h | 48 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+)
drivers/base/regmap/regmap.c +8 -0
@@ -999,6 +999,8 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,if (!async)return -ENOMEM ; +trace_regmap_async_write_start (map->dev, reg, val_len); + async->work_buf =kzalloc (map->format.buf_size,GFP_KERNEL |GFP_DMA );if (!async->work_buf) {
@@ -1640,6 +1642,8 @@ void regmap_async_complete_cb(struct regmap_async *async, int ret)struct regmap *map = async->map;bool wake; +trace_regmap_async_io_complete (map->dev); +spin_lock (&map->async_lock);list_del (&async->list);
@@ -1686,6 +1690,8 @@ int regmap_async_complete(struct regmap *map)if (!map->bus->async_write)return 0 ; +trace_regmap_async_complete_start (map->dev); +wait_event (map->async_waitq,regmap_async_is_done (map));spin_lock_irqsave (&map->async_lock, flags);
@@ -1693,6 +1699,8 @@ int regmap_async_complete(struct regmap *map) map->async_ret =0 ;spin_unlock_irqrestore (&map->async_lock, flags); +trace_regmap_async_complete_done (map->dev); +return ret; }EXPORT_SYMBOL_GPL (regmap_async_complete);
include/trace/events/regmap.h +48 -0
54 lines not on this page · raw message
Signature · 1 line
1.7.10.4