From 97c0252aecbb208cdf590011b61e0d4863815201 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Tue, 19 Aug 2008 04:52:41 +0000 Subject: [PATCH] Branch b1_6 b=16589 i=nathan, robert.read Use printk_ratelimit() check for debug daemon. --- lnet/libcfs/tracefile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lnet/libcfs/tracefile.c b/lnet/libcfs/tracefile.c index 4edafaa..fac840b 100644 --- a/lnet/libcfs/tracefile.c +++ b/lnet/libcfs/tracefile.c @@ -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); -- 1.8.3.1