diff options
| author | Tejun Heo <[email protected]> | 2019-08-29 22:47:19 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2019-08-30 13:42:49 +0000 |
| commit | 3a8e9ac89e6a5106cfb6b85d4c9cf9bfa3519bc7 (patch) | |
| tree | 690ba707f1bd5b427751ff434fc27ae7fd022ab0 /fs/fs-writeback.c | |
| parent | blkcg: add missing NULL check in ioc_cpd_alloc() (diff) | |
| download | kernel-3a8e9ac89e6a5106cfb6b85d4c9cf9bfa3519bc7.tar.gz kernel-3a8e9ac89e6a5106cfb6b85d4c9cf9bfa3519bc7.zip | |
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
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 |
