migrate_pages: fix deadlock in batched synchronous migration
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 18 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | migrate_pages: fix deadlock in batched migrationmm/ | +19 | 4 replies | |
| 2/3 | migrate_pages: move split folios processing out of migrate_pages_batch()mm/ | +26 | 3 replies | |
| 3/3 | migrate_pages: try migrate in batch asynchronously firstlymm/ | +55 | 9 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Hugh Dickins | Baolin Wang |
|---|---|---|
| 1/3 | ||
| 2/3 | R-b | |
| 3/3 | T-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] migrate_pages: fix deadlock in batched synchronous migration
Two deadlock bugs were reported for the migrate_pages() batching series. Thanks Hugh and Pengfei. Analysis shows that if we have locked some other folios except the one we are migrating, it's not safe in general to wait synchronously, for example, to wait the writeback to complete or wait to lock the buffer head.
So 1/3 fixes the deadlock in a simple way, where the batching support for the synchronous migration is disabled. The change is straightforward and easy to be understood. While 3/3 re-introduce the batching for synchronous migration via trying to migrate asynchronously in batch optimistically, then fall back to migrate synchronously one by one for fail-to-migrate folios. Test shows that this can restore the TLB flushing batching performance for synchronous migration effectively.
Best Regards,
Huang, Ying