[PATCH] ratelimit files_deny_checkpointing output

From: Nathan Lynch
Date: Mon Mar 09 2009 - 23:36:40 EST


Any common distribution's boot sequence causes thousands of
"<something> performed an action that cannot be checkpointed"
messages. Kernels are known to produce other messages of interest at
times, so ratelimit the output of files_deny_checkpointing.


Signed-off-by: Nathan Lynch <ntl@xxxxxxxxx>
---
include/linux/checkpoint.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h
index 27366ac..efdb8f0 100644
--- a/include/linux/checkpoint.h
+++ b/include/linux/checkpoint.h
@@ -108,8 +108,10 @@ static inline void __files_deny_checkpointing(const struct task_struct *tsk,
{
if (!test_and_clear_bit(0, &files->may_checkpoint))
return;
- printk(KERN_INFO "%s/%i performed an action that can not be "
- "checkpointed at: %s:%d\n", tsk->comm, tsk->pid, file, line);
+ if (printk_ratelimit())
+ printk(KERN_INFO "%s/%i performed an action that can not be "
+ "checkpointed at: %s:%d\n",
+ tsk->comm, tsk->pid, file, line);
}
#define files_deny_checkpointing(tsk,f) \
__files_deny_checkpointing(tsk, f, __FILE__, __LINE__)
--
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/