[LTP] [PATCH] swapping: replace mem_free by mem_available

Li Wang liwang@redhat.com
Mon Aug 1 09:36:31 CEST 2016


On Mon, Aug 01, 2016 at 03:15:14AM -0400, Jan Stancek wrote:
> 
> ----- Original Message -----
> > 
> > How much should the X defined?
> 
> I'd say at least 10 as with original testcase.
> 
> > 
> > >   i++;
> > >   swapped = read_meminfo("SwapFree:");
> > >   sleep(1);
> > >   if (abs(swapped - read_meminfo("SwapFree:")) < 512)
> > 
> > Why set the limitation as 512?  why not 1024 or others?
> 
> I picked that by rule of thumb, the value should be smaller
> than what any system can write to swap within 1s. But if we
> go too low then some noise from background processes could be
> falsely recognized as swap usage.

Ok, thanks for the explanaiton. Patch V2 is coming.

Regards,
Li Wang


More information about the ltp mailing list