Whamcloud - gitweb
LU-15317 llite: Make iotrace logging quieter
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 4 Mar 2022 15:31:02 +0000 (10:31 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 9 Mar 2022 17:17:59 +0000 (17:17 +0000)
Most of the time, we don't read any pages with readahead,
since we're moving through the window and aren't ready to
read more yet.  That's important for readahead debug, but
there's no need to log it for iotrace.  (This matters
because without this change, this messsage is the large
majority of iotrace messages.)

test-parameters: trivial

Lustre-change: https://review.whamcloud.com/45887/
Lustre-commit: c8e04d958073e15040691c03606c1eb7631b5aff (tbd)

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I58197acd1ef97c903320a2433ec1d5dcb0e46bd0
Reviewed-on: https://review.whamcloud.com/46700
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/rw.c

index bce6a17..a362b17 100644 (file)
@@ -1679,7 +1679,10 @@ int ll_io_read_page(const struct lu_env *env, struct cl_io *io,
                rc2 = ll_readahead(env, io, &queue->c2_qin, ras,
                                   uptodate, file, skip_index,
                                   &ra_start_index);
-               CDEBUG(D_READA|D_IOTRACE,
+               /* to keep iotrace clean, we only print here if we actually
+                * read pages
+                */
+               CDEBUG(D_READA | (rc2 ? D_IOTRACE : 0),
                       DFID " %d pages read ahead at %lu, triggered by user read at %lu\n",
                       PFID(ll_inode2fid(inode)), rc2, ra_start_index,
                       vvp_index(vpg));