Re: [PATCH gmem FIXUP v2] mm, compaction: make testing mapping_unmovable() safe

2023-09-08 Thread Sean Christopherson
On Fri, 08 Sep 2023 09:42:23 +0200, Vlastimil Babka wrote: > As Kirill pointed out, mapping can be removed under us due to > truncation. Test it under folio lock as already done for the async > compaction / dirty folio case. To prevent locking every folio with > mapping to do the test, do it only f

[PATCH gmem FIXUP v2] mm, compaction: make testing mapping_unmovable() safe

2023-09-08 Thread Vlastimil Babka
As Kirill pointed out, mapping can be removed under us due to truncation. Test it under folio lock as already done for the async compaction / dirty folio case. To prevent locking every folio with mapping to do the test, do it only for unevictable folios, as we can expect the unmovable mapping folio