]> git.ipfire.org Git - thirdparty/systemd.git/commit
oom: log one-time warning if kernel doesn't provide memory.swap.current 19647/head
authorDan Streetman <ddstreet@canonical.com>
Fri, 14 May 2021 12:08:33 +0000 (08:08 -0400)
committerDan Streetman <ddstreet@canonical.com>
Thu, 20 May 2021 19:40:29 +0000 (15:40 -0400)
commit135400276c2b8262d2946bfa1369ae46055d664b
treeca04cd9c774803ccd4fcc4c8149018331df08e94
parent0de2fd18705caa49fc1179e241cd2fbb22bd42e3
oom: log one-time warning if kernel doesn't provide memory.swap.current

The kernel can be compiled without support for any memory.swap.* files, or
it can be disabled at boot time with the 'swapaccount=0' boot parameter,
so if the file doesn't exist log warning indicating the kernel doesn't
support the file and the user may need to try using the 'swapaccount=1'
boot param.

Note that the actual error from the call to fopen() is ENOENT, but
that is translated into ENODATA in cg_get_attribute_as_uint64()
src/oom/oomd-util.c