login
Header Space

 
 

Re: GFP_ATOMIC page allocation failures.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nick Piggin <nickpiggin@...>
Cc: <7eggert@...>, Jeff Garzik <jeff@...>, Andrew Morton <akpm@...>, Chris Snook <csnook@...>, Dave Jones <davej@...>, Linux Kernel <linux-kernel@...>, NetDev <netdev@...>, David Miller <davem@...>, Linus Torvalds <torvalds@...>
Date: Friday, April 4, 2008 - 7:35 am

On Fri, 4 Apr 2008, Nick Piggin wrote:


I think there was a standalone ratelimit function. I'd use it like this:

static atomic_alloc_ratelimit; /* needs to be initialized ... */

{
	...
	if (success)
		return mem;
	if(!debug && ratelimit(atomic_alloc_ratelimit))
		return err_ptr(-ENOMEM);
	if (printk_ratelimit(first line) > 0) {
		printk(rest);
	}
}


You shouldn't frighten the users either. /proc/sys/vm/debug?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: GFP_ATOMIC page allocation failures., Bodo Eggert, (Fri Apr 4, 5:52 am)
Re: GFP_ATOMIC page allocation failures., Nick Piggin, (Fri Apr 4, 6:59 am)
Re: GFP_ATOMIC page allocation failures., Bodo Eggert, (Fri Apr 4, 7:35 am)
Re: GFP_ATOMIC page allocation failures., Nick Piggin, (Fri Apr 4, 9:06 pm)
Re: GFP_ATOMIC page allocation failures., Bodo Eggert, (Sun Apr 6, 8:12 am)
speck-geostationary