mm/shmem, swap: overdue shmem_swapin_folio() fixes
Status from this message: This is a note to let you know that I've just added the patch titled
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mm: shmem: fix potential data corruption during shmem swapinmm/ | +27 | 1 reply | |
| 2/4 | mm: shmem: avoid unpaired folio_unlock() in shmem_swapin_folio()mm/ | +2 | 1 reply | |
| 3/4 | mm/shmem, swap: improve cached mTHP handling and fix potential hangmm/ | +30 | 1 reply | |
| 4/4 | mm/shmem, swap: avoid redundant Xarray lookup during swapinmm/ | +25 | 1 reply |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Kairui Song | Baolin Wang | Kemeng Shi | Dev Jain |
|---|---|---|---|---|
| 1/4 | T-b T-b | |||
| 2/4 | R-b R-b | R-b R-b | ||
| 3/4 | R-b T-b R-b T-b | R-b R-b | ||
| 4/4 | R-b R-b | R-b R-b | R-b R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 6.12.y 0/4] mm/shmem, swap: overdue shmem_swapin_folio() fixes
Greg Thelen (assisted by Gemini) has observed that 6.12.69 commit a99f9a4669a0 ("mm/shmem, swap: fix race of truncate and swap entry split") and its followupdfc3ab6bd648 ("mm, shmem: prevent infinite loop on truncate race") both rely on shmem_confirm_swap() to be returning int order or -1, whereas in the 6.12.78-rc tree it is still returning bool 0 or 1.
Quite what the effect of that is, I've not tried to work out: luckily, it's on an unlikely path which most of us find difficult to reproduce; but better be fixed!
And applying the Stable-dep which made that change from bool to int order reminds me of two "Cc stable" fixes from last year (and a followup fix to one of them), which never got applied to the 6.12.y shmem_swapin_folio() because of intervening mods. Aside from minimizing the rejects, there is little point in holding that "truncate and swap entry split" fix without the more basic shmem swap order fixes found much earlier.
My own poor testing hit none of these issues: I hope others can verify.
1/4 mm: shmem: fix potential data corruption during shmem swapin 2/4 mm: shmem: avoid unpaired folio_unlock() in shmem_swapin_folio() 3/4 mm/shmem, swap: improve cached mTHP handling and fix potential hang 4/4 mm/shmem, swap: avoid redundant Xarray lookup during swapin
mm/shmem.c | 97 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 17 deletions(-)
Thanks,
Hugh