Whamcloud - gitweb
Branch b1_6
authoryangsheng <yangsheng>
Tue, 19 Aug 2008 04:52:41 +0000 (04:52 +0000)
committeryangsheng <yangsheng>
Tue, 19 Aug 2008 04:52:41 +0000 (04:52 +0000)
b=16589
i=nathan, robert.read

Use printk_ratelimit() check for debug daemon.

lnet/libcfs/tracefile.c

index 4edafaa..fac840b 100644 (file)
@@ -188,8 +188,10 @@ static void tcd_shrink(struct trace_cpu_data *tcd)
         * from here: this will lead to infinite recursion.
         */
 
-        printk(KERN_WARNING "debug daemon buffer overflowed; discarding"
-               " 10%% of pages (%d of %ld)\n", pgcount + 1, tcd->tcd_cur_pages);
+       if (printk_ratelimit())
+                printk(KERN_WARNING "debug daemon buffer overflowed; "
+                      "discarding  10%% of pages (%d of %ld)\n",
+                      pgcount + 1, tcd->tcd_cur_pages);
 
         CFS_INIT_LIST_HEAD(&pc.pc_pages);
         spin_lock_init(&pc.pc_lock);