Commit 47932e7
mm: remove folio from deferred split list before uncharging it
When freeing a large folio, we must remove it from the deferred split list
before we uncharge it as each memcg has its own deferred split list (with
associated lock) and removing a folio from the deferred split list while
holding the wrong lock will corrupt that list and cause various related
problems.
Link: https://lore.kernel.org/linux-mm/367a14f7-340e-4b29-90ae-bc3fcefdd5f4@arm.com/
Link: https://lkml.kernel.org/r/20240311191835.312162-1-willy@infradead.org
Fixes: f77171d (mm: allow non-hugetlb large folios to be batch processed)
Fixes: 29f3843 (mm: free folios directly in move_folios_to_lru())
Fixes: bc2ff4c (mm: free folios in a batch in shrink_folio_list())
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Debugged-by: Ryan Roberts <ryan.roberts@arm.com>
Tested-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 58f327f commit 47932e7
2 files changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
1015 | 1018 | | |
1016 | 1019 | | |
1017 | 1020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
1416 | 1419 | | |
1417 | 1420 | | |
1418 | 1421 | | |
| |||
1819 | 1822 | | |
1820 | 1823 | | |
1821 | 1824 | | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
1822 | 1828 | | |
1823 | 1829 | | |
1824 | 1830 | | |
| |||
0 commit comments