Whamcloud - gitweb
LU-8413 llite: specify READA debug mask for sanity_101f 53/22753/4
authorBobi Jam <bobijam.xu@intel.com>
Tue, 27 Sep 2016 01:22:20 +0000 (09:22 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 5 Oct 2016 03:51:05 +0000 (03:51 +0000)
So that debug log only contains relevant messages for debugging
purpose.

Test-Parameters: trivial
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ia02e6ed41a3a2166dcf6b04441027517594bb35d
Reviewed-on: http://review.whamcloud.com/22753
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/rw.c
lustre/tests/sanity.sh

index 00ae698..761dd04 100644 (file)
@@ -737,6 +737,9 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode,
 
        spin_lock(&ras->ras_lock);
 
+       if (!hit)
+               CDEBUG(D_READA, DFID " pages at %lu miss.\n",
+                      PFID(ll_inode2fid(inode)), index);
         ll_ra_stats_inc_sbi(sbi, hit ? RA_STAT_HIT : RA_STAT_MISS);
 
         /* reset the read-ahead window in two cases.  First when the app seeks
index ca79475..f8478a2 100755 (executable)
@@ -6715,6 +6715,9 @@ run_test 101e "check read-ahead for small read(1k) for small files(500k)"
 test_101f() {
        which iozone || { skip "no iozone installed" && return; }
 
+       local old_debug=$($LCTL get_param debug)
+       $LCTL set_param debug="reada mmap"
+
        # create a test file
        iozone -i 0 -+n -r 1m -s 128m -w -f $DIR/$tfile > /dev/null 2>&1
 
@@ -6728,10 +6731,12 @@ test_101f() {
        iozone -i 1 -+n -r 32k -s 128m -B -f $DIR/$tfile > /dev/null 2>&1
 
        echo checking missing pages
+       $LCTL get_param llite.*.read_ahead_stats
        local miss=$($LCTL get_param -n llite.*.read_ahead_stats |
                        get_named_value 'misses' | cut -d" " -f1 | calc_total)
 
-       [ $miss -lt 3 ] || error "misses too much pages!"
+       $LCTL set_param debug=$old_debug
+       [ $miss -lt 3 ] || error "misses too much pages ('$miss')!"
        rm -f $DIR/$tfile
 }
 run_test 101f "check mmap read performance"