public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 0/2] mem: ksm: race condition fixes
Date: Thu, 24 Aug 2017 19:54:49 +0200	[thread overview]
Message-ID: <20170824175451.13225-1-aarcange@redhat.com> (raw)

Hello,

some false positives triggered the LTP ksm?? tests on some arch with
slower CPU. The volatile pages weren't zero during the checks, as they
should have been.

Volatile pages left around means there are orphaned rmap_items, that
can happen if the KSM scans aren't complete.

I believe the problem is with the waiting that wasn't waiting two full
passes, but it only waited until the values stopped changing after 10
seconds of wait time. Plus the ksm?? children were still running by
the time the wait time started.

The first patch takes care of waiting two scans (more efficiently,
with a polling of 1 sec). That change then exposes the problem with
the ksm?? children not being stopped before we start waiting, and the
second patch fixes that.

After applying these two fixes, we had hundred of successful runs on
the same system that showed volatile pages not zero, without any
further failures.

Thanks,
Andrea

Andrea Arcangeli (2):
  mem: ksm: fix volatile page false positive
  mem: ksm: fixes for race conditions

 testcases/kernel/mem/lib/mem.c | 93 ++++++++++++++++++++++--------------------
 1 file changed, 49 insertions(+), 44 deletions(-)

             reply	other threads:[~2017-08-24 17:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 17:54 Andrea Arcangeli [this message]
2017-08-24 17:54 ` [LTP] [PATCH 1/2] mem: ksm: fix volatile page false positive Andrea Arcangeli
2017-08-24 17:54 ` [LTP] [PATCH 2/2] mem: ksm: fixes for race conditions Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2017-08-25  8:34 [LTP] [PATCH 0/2] mem: ksm: race condition fixes Andrea Arcangeli
2017-09-05  2:22 ` Bhupesh Sharma

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=20170824175451.13225-1-aarcange@redhat.com \
    --to=aarcange@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