Messages in this thread |  | | | Subject | Re: [patch] oom: dump stack and VM state when oom killer panics | | From | Joe Perches <> | | Date | Mon, 21 Sep 2009 14:12:19 -0700 |
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...
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |