public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/2] mem: ksm: race condition fixes
@ 2017-08-25  8:34 Andrea Arcangeli
  2017-08-25  8:34 ` [LTP] [PATCH 1/2] mem: ksm: fix volatile page false positive Andrea Arcangeli
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Andrea Arcangeli @ 2017-08-25  8:34 UTC (permalink / raw)
  To: ltp

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.

Try #2, first submit bounced because I thought I subscribed, but I was
still one click away.

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(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [LTP] [PATCH 0/2] mem: ksm: race condition fixes
@ 2017-08-24 17:54 Andrea Arcangeli
  2017-08-24 17:54 ` [LTP] [PATCH 1/2] mem: ksm: fix volatile page false positive Andrea Arcangeli
  0 siblings, 1 reply; 9+ messages in thread
From: Andrea Arcangeli @ 2017-08-24 17:54 UTC (permalink / raw)
  To: ltp

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(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-09-13 13:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25  8:34 [LTP] [PATCH 0/2] mem: ksm: race condition fixes Andrea Arcangeli
2017-08-25  8:34 ` [LTP] [PATCH 1/2] mem: ksm: fix volatile page false positive Andrea Arcangeli
2017-09-12  8:11   ` Richard Palethorpe
2017-09-13 11:58   ` Cyril Hrubis
2017-09-13 13:47     ` Andrea Arcangeli
2017-08-25  8:34 ` [LTP] [PATCH 2/2] mem: ksm: fixes for race conditions Andrea Arcangeli
2017-09-13  7:46   ` Richard Palethorpe
2017-09-05  2:22 ` [LTP] [PATCH 0/2] mem: ksm: race condition fixes Bhupesh Sharma
  -- strict thread matches above, loose matches on Subject: below --
2017-08-24 17:54 Andrea Arcangeli
2017-08-24 17:54 ` [LTP] [PATCH 1/2] mem: ksm: fix volatile page false positive Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox