From: Patrick Farrell Date: Wed, 9 Feb 2022 21:14:23 +0000 (-0500) Subject: LU-15317 llite: Add COMPLETED iotrace messages X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F84%2F46484%2F1;p=fs%2Flustre-release.git LU-15317 llite: Add COMPLETED iotrace messages It's very useful to see how long an I/O call took. There are other ways to do this, but the goal is for iotrace to provide all necessary information for basic I/O performance analysis, so we add COMPLETED messages to iotrace. Signed-off-by: Patrick Farrell Change-Id: I17f52ebc87a31d5ba34f63dc8b6a279e83cd10ef --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 394b623..25404a4 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -1976,6 +1976,12 @@ out: ktime_us_delta(ktime_get(), kstart)); } + CDEBUG(D_IOTRACE, + "COMPLETED: file %s:"DFID", ppos: %lld, count: %zu\n", + file_dentry(file)->d_name.name, + PFID(ll_inode2fid(file_inode(file))), iocb->ki_pos, + iov_iter_count(to)); + RETURN(result); } @@ -2119,6 +2125,12 @@ out: ktime_us_delta(ktime_get(), kstart)); } + CDEBUG(D_IOTRACE, + "COMPLETED: file %s:"DFID", ppos: %lld, count: %zu\n", + file_dentry(file)->d_name.name, + PFID(ll_inode2fid(file_inode(file))), iocb->ki_pos, + iov_iter_count(from)); + RETURN(rc_normal); } diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index d976c25..8da0702 100644 --- a/lustre/llite/llite_mmap.c +++ b/lustre/llite/llite_mmap.c @@ -423,6 +423,11 @@ out: ktime_us_delta(ktime_get(), kstart)); } + CDEBUG(D_IOTRACE, + "COMPLETED: "DFID": vma=%p start=%#lx end=%#lx vm_flags=%#lx idx=%lu\n", + PFID(&ll_i2info(file_inode(vma->vm_file))->lli_fid), + vma, vma->vm_start, vma->vm_end, vma->vm_flags, vmf->pgoff); + return result; } @@ -498,6 +503,11 @@ out: ktime_us_delta(ktime_get(), kstart)); } + CDEBUG(D_IOTRACE, + "COMPLETED: "DFID": vma=%p start=%#lx end=%#lx vm_flags=%#lx idx=%lu\n", + PFID(&ll_i2info(file_inode(vma->vm_file))->lli_fid), + vma, vma->vm_start, vma->vm_end, vma->vm_flags, + vmf->page->index); return result; }