summaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2010-10-26 14:22:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 16:52:16 -0700
commit77006a0a828249dd69341f960043ee41e7487aa0 (patch)
treee3524692543f73fe5c75f5aefad48fecf4cdb4bb /include/linux/kernel.h
parentf5d87d851d76a390d0fab2f77bd1d563d69ee586 (diff)
downloadblackbird-op-linux-77006a0a828249dd69341f960043ee41e7487aa0.tar.gz
blackbird-op-linux-77006a0a828249dd69341f960043ee41e7487aa0.zip
ratelimit: add comment warning people off printk_ratelimit()
printk_ratelimit() was a bad idea - we don't want subsytem A causing ratelimiting of subsystem B's messages. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index e9b492b33032..77b04ed037df 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -277,6 +277,11 @@ asmlinkage int vprintk(const char *fmt, va_list args)
asmlinkage int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2))) __cold;
+/*
+ * Please don't use printk_ratelimit(), because it shares ratelimiting state
+ * with all other unrelated printk_ratelimit() callsites. Instead use
+ * printk_ratelimited() or plain old __ratelimit().
+ */
extern int __printk_ratelimit(const char *func);
#define printk_ratelimit() __printk_ratelimit(__func__)
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
OpenPOWER on IntegriCloud