From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH/RFC] tst_process_state_wait: wait for schedstats to settle when state == S
Date: Thu, 7 Nov 2019 07:31:47 -0500 (EST) [thread overview]
Message-ID: <181797128.10929989.1573129907706.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20191107121520.GC22352@rei.lan>
----- Original Message -----
> Hi!
> > hb->lock is locked at this point, and requeue takes it too, so I'm not
> > sure what makes it fail. I've seen testcase fail in at least
> > 2 different ways now. Here's the other one:
>
> Here is another theory, some of the processes may be sleeping in a
> different place in the kernel, somewhere between the fork() and the
> futex(), and hence we think that they have been suspended on the futex
> but aren't.
>
> I guess that what we can do is to put a counter in a piece of shared
> memory and increment it from each child just before the futex_wait()
> call and wait in the parent until the counter reached num_waiters.
It does look related to spurious wake ups and fact that test doesn't
change futex value. I raised it on lkml, here's important part:
"If there is an actual use case for keeping the uaddr1 value the same across
a requeue then this needs to be described properly and also needs to be
handled differently and consistently in all cases not just for a spurious
wakeup."
https://lore.kernel.org/lkml/alpine.DEB.2.21.1911070009040.1869@nanos.tec.linutronix.de/T/#m5662b71d7e0d14b6d74137c1da81d774e5035f9a
prev parent reply other threads:[~2019-11-07 12:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 11:57 [LTP] [PATCH/RFC] tst_process_state_wait: wait for schedstats to settle when state == S Jan Stancek
2019-11-06 9:59 ` Jan Stancek
2019-11-07 11:39 ` Cyril Hrubis
2019-11-07 12:03 ` Cyril Hrubis
2019-11-07 12:15 ` Cyril Hrubis
2019-11-07 12:31 ` Jan Stancek [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=181797128.10929989.1573129907706.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