diff options
author | Tejun Heo <tj@kernel.org> | 2019-08-29 15:47:19 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-08-30 07:42:49 -0600 |
commit | 3a8e9ac89e6a5106cfb6b85d4c9cf9bfa3519bc7 (patch) | |
tree | 690ba707f1bd5b427751ff434fc27ae7fd022ab0 /fs/fs-writeback.c | |
parent | e916ad29d96485e5aa3d3237bfeab1522c713d5e (diff) |
writeback: add tracepoints for cgroup foreign writebacks
cgroup foreign inode handling has quite a bit of heuristics and
internal states which sometimes makes it difficult to understand
what's going on. Add tracepoints to improve visibility.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 658dc16c9e6d..8aaa7eec7b74 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -389,6 +389,8 @@ static void inode_switch_wbs_work_fn(struct work_struct *work) if (unlikely(inode->i_state & I_FREEING)) goto skip_switch; + trace_inode_switch_wbs(inode, old_wb, new_wb); + /* * Count and transfer stats. Note that PAGECACHE_TAG_DIRTY points * to possibly dirty pages while PAGECACHE_TAG_WRITEBACK points to @@ -673,6 +675,9 @@ void wbc_detach_inode(struct writeback_control *wbc) if (wbc->wb_id != max_id) history |= (1U << slots) - 1; + if (history) + trace_inode_foreign_history(inode, wbc, history); + /* * Switch if the current wb isn't the consistent winner. * If there are multiple closely competing dirtiers, the |