Re: [PATCH] oom-killer trigger

David Mansfield (lkml@dm.ultramaster.com)
Thu, 01 Mar 2001 17:51:45 -0500


>
> 1. the OOM killer never triggers if we have > freepages.min
> of free memory
> 2. __alloc_pages() never allocates pages to < freepages.min
> for user allocations
>
> ==> the OOM killer never gets triggered under some workloads;
> the system just sits around with nr_free_pages == freepages.min
>
> The patch below trivially fixes this by upping the OOM kill limit
> by a really small number of pages ...

> + if (nr_free_pages() > freepages.min + 4)

Call me stupid, but why not just change the > to >= (or < to <=) rather
than introducing a magic number (4). Or at least make the magic number
interesting, like:

+ if (nr_free_pages() > freepages.min + 42)

:-)

Thanks for the bugfix,
David

-- 
David Mansfield                                           (718) 963-2020
david@ultramaster.com
Ultramaster Group, LLC                               www.ultramaster.com
-
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/