lkml.org 
[lkml]   [2009]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] oom: dump stack and VM state when oom killer panics
From
Date
On Mon, 2009-09-21 at 13:41 -0700, Andrew Morton wrote:
> The code shouldn't be using printk_ratelimit() - in fact nothing should
> be using it and we should remove printk_ratelimit() from the kernel, I
> suspect.

Perhaps a per instance use instead. Something like:

#define printk_ratelimited(fmt, arg...) \
({ static struct ratelimit_state _rs = { \
.interval = DEFAULT_RATELIMIT_INTERVAL, \
.burst = DEFAULT_RATELIMIT_BURST, \
}; \
int rtn; \
\
if (!__ratelimit(&_rs)) \
rtn = printk(fmt, ##arg); \
else \
rtn = 0; \
rtn; \
})

#define pr_info_rl(fmt, arg) \
printk_ratelimited(KERN_INFO pr_fmt(fmt), ##arg)
etc...




\
 
 \ /
  Last update: 2009-09-21 23:15    [W:0.134 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site