Re: [PATCH] Warn if we run out of swap space

Andrew Morton
2009-05-26T21:01:14Z

On Tue, 26 May 2009 16:54:58 -0400 (EDT)
Christoph Lameter <cl@linux.com> wrote:

> On Tue, 26 May 2009, Andrew Morton wrote:
>
> > I still worry that there may be usage patterns which will result in
> > this message coming out many times.
>
> Note that vm_swa_full is defined the following way
>
> #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
>
> This means that vm_swap_full is true when more than 50% of swap are in
> use. The printed flag will therefore only be cleared if swap use falls to
> less than half.

(which was highly relevant changelog material)

OK. But it that optimal?