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

2023-09-06 Thread Vlastimil Babka
On 9/6/23 01:56, Sean Christopherson wrote: > On Fri, Sep 01, 2023, 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 >>

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

2023-09-05 Thread Sean Christopherson
On Fri, Sep 01, 2023, 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 for unevictable

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

2023-09-02 Thread Matthew Wilcox
On Fri, Sep 01, 2023 at 10:20:26AM +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

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

2023-09-01 Thread kirill . shutemov
On Fri, Sep 01, 2023 at 10:20:26AM +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

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

2023-09-01 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