From 432edcde555d6237c5a8cdc40ad5622beb8e52f0 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Tue, 19 Aug 2008 05:04:50 +0000 Subject: [PATCH] Branch HEAD b=16589 i=nathan, robert.read Add printk_ratelimit() check for debug daemon. --- libcfs/libcfs/tracefile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libcfs/libcfs/tracefile.c b/libcfs/libcfs/tracefile.c index f86e0ac..9107ebb 100644 --- a/libcfs/libcfs/tracefile.c +++ b/libcfs/libcfs/tracefile.c @@ -187,8 +187,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