Re: [patch 1/3] mm: An enhancement of OVERCOMMIT_GUESS

From: KAMEZAWA Hiroyuki
Date: Wed Apr 05 2006 - 21:00:32 EST



Hi, AOKI-san

On Wed, 05 Apr 2006 19:47:27 -0400
Hideo AOKI <haoki@xxxxxxxxxx> wrote:

> Hello Andrew,
>
> Could you apply my patches to your tree?
>
> These patches are an enhancement of OVERCOMMIT_GUESS algorithm in
> __vm_enough_memory(). The detailed description is in attached patch.
>

I think adding a function like this is more simple way.
(call this istead of nr_free_pages().)
==
int nr_available_memory()
{
unsigned long sum = 0;
for_each_zone(zone) {
if (zone->free_pages > zone->pages_high)
sum += zone->free_pages - zone->pages_high;
}
return sum;
}
==

BTW, vm_enough_memory() doesn't eat cpuset information ?

-Kame

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/