numa_helper: don't break is_numa() with TCONF
Li reported, that some oom tests on aarch64 exit with TCONF
during is_numa() call, because get_mempolicy syscall is not
implemented. And because numa_helper used ltp_syscall() it
terminated the test in all instances.
Make sure we check that NUMA is available first with
numa_available(). In case it's not supported return empty
set of nodes.
Also ignore ENOSYS from get_mempolicy. At the moment this is
redundant, because numa_available() implementation is based
on availability of get_mempolicy as well, but extra check
doesn't hurt in case it would change in future.
Reported-by: Li Wang <liwang@redhat.com>
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
1 file changed