Skip to content

s390/uv: handle folios that cannot be split while dirty

David Hildenbrand kvm linux-mm linux-s390 lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3s390/uv: don't return 0 from make_hva_secure() if the operation was not successfularch/s390/kernel/uv.c+4 -14 replies
2/3s390/uv: always return 0 from s390_wiggle_split_folio() if successfularch/s390/kernel/uv.c+12 -101 reply
3/3s390/uv: improve splitting of large folios that cannot be split while dirtyarch/s390/kernel/uv.c+60 -60 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchClaudio Imbrenda
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/3] s390/uv: handle folios that cannot be split while dirty

From patch #3:

"
Currently, starting a PV VM on an iomap-based filesystem with large folio support, such as XFS, will not work. We'll be stuck in unpack_one()->gmap_make_secure(), because we can't seem to make progress splitting the large folio.

The problem is that we require a writable PTE but a writable PTE under such filesystems will imply a dirty folio.

So whenever we have a writable PTE, we'll have a dirty folio, and dirty iomap folios cannot currently get split, because split_folio()->split_huge_page_to_list_to_order()->filemap_release_folio() will fail in iomap_release_folio().

So we will not make any progress splitting such large folios. "

Let's fix one related problem during unpack first, to then handle such folios by triggering writeback before immediately trying to split them again.

This makes it work on XFS with large folios again.

Long-term, we should cleanly supporting splitting such folios even without writeback, but that's a bit harder to implement and not a quick fix.

Cc Christian Borntraeger <[email protected]>
Cc Janosch Frank <[email protected]>
Cc Claudio Imbrenda <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Alexander Gordeev <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Thomas Huth <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Zi Yan <[email protected]>
Cc Sebastian Mitterle <[email protected]>

David Hildenbrand (3):
s390/uv: don't return 0 from make_hva_secure() if the operation was
not successful
s390/uv: always return 0 from s390_wiggle_split_folio() if successful s390/uv: improve splitting of large folios that cannot be split while
dirty

 arch/s390/kernel/uv.c | 85 ++++++++++++++++++++++++++++++++++++-------
 1 file changed, 72 insertions(+), 13 deletions(-)

base-commit: 088d13246a4672bc03aec664675138e3f5bff68c

Signature · 1 line
2.49.0