lkml.org 
[lkml]   [2006]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH (try #2)] mm: avoid unnecessary OOM kills
Dave wrote:
> - if (printk_ratelimit()) {
> - printk("oom-killer: gfp_mask=0x%x, order=%d\n",
> - gfp_mask, order);
> - dump_stack();
> - show_mem();
> - }
> -
> + printk("oom-killer: gfp_mask=0x%x, order=%d\n", gfp_mask, order);
> + dump_stack();
> + show_mem();

Why disable this printk_ratelimit? Does this expose us to a Denial of
Service attack from someone forcing multiple oom-kills in a small
cpuset, generating much kernel printk output?

> +/* Try to allocate one more time before invoking the OOM killer. */
> +static struct page * oom_alloc(gfp_t gfp_mask, unsigned int order,

This comment is slightly stale. Not only does oom_alloc() try one
more allocation, it also actually does invoke the OOM killer.

How about the comment:

/* Serialize oom killing, while trying to allocate a page */

Or some such ..

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
-
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/

\
 
 \ /
  Last update: 2006-05-23 00:15    [W:0.039 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site