Re: memcg/functional: fix memcg_failcnt intermittent timeout by disabling swap
Andrea Cervesato via ltp <[email protected]> Mon, 03 Aug 2026 13:38:37 +0000
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
Hi Xuewen,
> > memcg/functional: fix memcg_failcnt intermittent timeout by disabling swap
>
> > + swapoff -a 2>/dev/null
> > +
> > start_memcg_process $2 -s ${MEMORY_TO_ALLOCATE}
>
> The 2>/dev/null here hides errors from the very command that implements
> the fix. If swapoff fails, or the command is not present, swap stays
> enabled and the intermittent timeout this patch targets can recur, now
> without any diagnostic to explain it.
>
> memcg_limit_in_bytes.sh, cited as the model for this change, runs
> swapoff -a and swapon -a without redirecting stderr. Would dropping the
> redirect (at least on swapoff) be preferable, so a failure to disable
> swap remains visible?
This is correct. If swapoff fails, we can't understand why.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato-IBi9RG/[email protected]
--
Mailing list info: https://lists.linux.it/listinfo/ltp