lkml.org 
[lkml]   [2003]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Configurable OOM killer Re: old oom-vm for 2.4.32 (was oom killer in 2.4.23)
Date
From
On Monday, 8-Dec-2003 at 15:15 -0200, Marcelo Tosatti wrote:

> The following patch makes OOM killer configurable (its the same as the
> other patches posted except its around CONFIG_OOM_KILLER).
>
> I hope the Configure.help entry is clear enough.
>
> Peter, can you please try this.
>
> Comments are appreciated.
[...]
> --- linux-2.4.24.orig/mm/page_alloc.c 2003-12-08 14:18:51.000000000 +0000
> +++ linux-2.4.24/mm/page_alloc.c 2003-12-08 15:49:35.000000000 +0000
> @@ -378,7 +378,8 @@
>
> /* here we're in the low on memory slow path */
>
> - if (current->flags & PF_MEMALLOC && !in_interrupt()) {
> + if (((current->flags & PF_MEMALLOC) && !in_interrupt()) ||
> + (current->flags & (PF_MEMALLOC | PF_MEMDIE))) {
> zone = zonelist->zones;
> for (;;) {
> zone_t *z = *(zone++);
[...]


Hi, Marcelo. I haven't studied this patch, but the change above looks
suspicious. The part added after the || makes the original condition
irrelevant (because the 2nd part is true if either the PF_MEMALLOC or
PF_MEMDIE flags are set).

Were you perhaps thinking of something like this?

if ((current->flags & PF_MEMALLOC) &&
((current->flags & PF_MEMDIE) || !in_interrupt())) {

Cheers. -ernie
-
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: 2005-03-22 13:59    [W:0.043 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site