[LTP] [PATCH] swapon01: swapon01: prevent OOM happening in swap process

Li Wang liwang@redhat.com
Tue Mar 19 04:28:21 CET 2024


On Mon, Mar 18, 2024 at 8:40 PM Wei Gao <wegao@suse.com> wrote:



>
> > That's because the available swapfile on your SUT is too small,
> > you can adjust it (then retest it) by yourself to find a proper size.
> >
> > This is fine as long as the swapfile size is less than 300MB,
> > otherwise we need to set .dev_min_size like what we did
> > for swapoff01.c.
> >
> > And, on the other side, we can't guarantee the system SwapCached
> > happened every time, it depends on the system's configuration.
> >
>
> 100M is good enough for current system, could you help check following
> patch?
>

Can we rewrite the make_swapfile() API to support passing MB size for
making the swapfile?

-- 
Regards,
Li Wang


More information about the ltp mailing list