public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] numa_helper: don't break is_numa() with TCONF
Date: Mon, 22 Feb 2016 07:46:40 -0500 (EST)	[thread overview]
Message-ID: <283548158.25448265.1456145200825.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160222113614.GB5704@rei.lan>





----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Monday, 22 February, 2016 12:36:15 PM
> Subject: Re: [LTP] [PATCH] numa_helper: don't break is_numa() with TCONF
> 
> Hi!
> > 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.
> > 
> > Switch to syscall() and let the tests decide what should happen
> > if system doesn't support NUMA.
> 
> Looking at the code the return value from filter_nodemask_mem() can be
> propagated to get_allowed_nodes() and doing git grep "get_allowed_nodes"
> suggets that most of the testcases does tst_brkm(TBROK | TERRNO, ...) if
> the call returned non-zero.

This patch hides ENOSYS returned from get_mempolicy. So the callers
won't get any more failures than before. Callers should still check
how many nodes have been returned and if that numbers works for
the test or not.

> Have you checked that they exit with TCONF
> on non-numa system before they reach the call to get_allowed_nodes()?

They should be free to call get_allowed_nodes(), at worst all they get
back is empty set.

We could add extra call of numa_available() to setup() before call to
get_allowed_nodes(), but since its implementation relies on same
syscall I'm not sure it's worth it:

int numa_available(void)
{
        if (get_mempolicy(NULL, NULL, 0, 0, 0) < 0 && errno == ENOSYS)
                return -1;
        return 0;
}

> 
> And the same for is_numa(), it calls tst_brkm(TBROK | TERRNO, ...) in
> case that get_allowed_nodes_arr() returned non-zero.

If get_allowed_nodes_arr() returned non-zero because of get_mempolicy,
that means get_mempolicy is implemented but failed. I think that
justifies TBROK.

Regards,
Jan

  reply	other threads:[~2016-02-22 12:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 15:02 [LTP] [PATCH] numa_helper: don't break is_numa() with TCONF Jan Stancek
2016-02-22 11:36 ` Cyril Hrubis
2016-02-22 12:46   ` Jan Stancek [this message]
2016-02-22 13:25     ` Cyril Hrubis
  -- strict thread matches above, loose matches on Subject: below --
2016-02-22 14:03 Jan Stancek
2016-02-22 14:26 ` Cyril Hrubis
2016-02-22 15:35   ` Jan Stancek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=283548158.25448265.1456145200825.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox