bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Yonghong Song <yhs@fb.com>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix test_progs send_signal flakiness with nmi mode
Date: Thu, 16 Jan 2020 13:31:54 -0800	[thread overview]
Message-ID: <CAADnVQJRD1Wb6rhwfx1Te6oyAfpAk_A8fuM7T5FPicv9Z7mckA@mail.gmail.com> (raw)
In-Reply-To: <CAEf4Bzbi0T5P=Dnja=pz3Nj0jhO9S+q_q1U4vfBwYP8enX+Zag@mail.gmail.com>

On Thu, Jan 16, 2020 at 10:25 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Thu, Jan 16, 2020 at 10:06 AM Yonghong Song <yhs@fb.com> wrote:
> >
> > Alexei observed that test_progs send_signal may fail if run
> > with command line "./test_progs" and the tests will pass
> > if just run "./test_progs -n 40".
> >
> > I observed similar issue with nmi subtest failure
> > and added a delay 100 us in Commit ab8b7f0cb358
> > ("tools/bpf: Add self tests for bpf_send_signal_thread()")
> > and the problem is gone for me. But the issue still exists
> > in Alexei's testing environment.
> >
> > The current code uses sample_freq = 50 (50 events/second), which
> > may not be enough. But if the sample_freq value is larger than
> > sysctl kernel/perf_event_max_sample_rate, the perf_event_open
> > syscall will fail.
> >
> > This patch changed nmi perf testing to use sample_period = 1,
> > which means trying to sampling every event. This seems fixing
> > the issue.
> >
> > Fixes: ab8b7f0cb358 ("tools/bpf: Add self tests for bpf_send_signal_thread()")
> > Signed-off-by: Yonghong Song <yhs@fb.com>
> > ---
>
> Good not to have to rely on arbitrary timeout!

Indeed.
Applied. Thanks

      reply	other threads:[~2020-01-16 21:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 17:40 [PATCH bpf-next] selftests/bpf: fix test_progs send_signal flakiness with nmi mode Yonghong Song
2020-01-16 18:24 ` Andrii Nakryiko
2020-01-16 21:31   ` Alexei Starovoitov [this message]

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=CAADnVQJRD1Wb6rhwfx1Te6oyAfpAk_A8fuM7T5FPicv9Z7mckA@mail.gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=yhs@fb.com \
    /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;
as well as URLs for NNTP newsgroup(s).