mem: ksm: race condition fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mem: ksm: fix volatile page false positivetestcases/ | +42 | 2 replies | |
| 1/2 | mem: ksm: fix volatile page false positive | +0 | 0 replies | |
| 2/2 | mem: ksm: fixes for race conditionstestcases/ | +7 | 1 reply |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Bhupesh Sharma |
|---|---|
| Series | R-b |
| 1/2 | |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [LTP] [PATCH 0/2] mem: ksm: race condition fixes
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(-)