linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] s390/uv: handle folios that cannot be split while dirty
@ 2025-05-16 12:39 David Hildenbrand
  2025-05-16 12:39 ` [PATCH v1 1/3] s390/uv: don't return 0 from make_hva_secure() if the operation was not successful David Hildenbrand
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: David Hildenbrand @ 2025-05-16 12:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-s390, kvm, linux-mm, David Hildenbrand,
	Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	Thomas Huth, Matthew Wilcox, Zi Yan, Sebastian Mitterle

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 <borntraeger@linux.ibm.com>
Cc: Janosch Frank <frankja@linux.ibm.com>
Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Sebastian Mitterle <smitterl@redhat.com>

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
-- 
2.49.0



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-05-17  0:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16 12:39 [PATCH v1 0/3] s390/uv: handle folios that cannot be split while dirty David Hildenbrand
2025-05-16 12:39 ` [PATCH v1 1/3] s390/uv: don't return 0 from make_hva_secure() if the operation was not successful David Hildenbrand
2025-05-16 14:07   ` David Hildenbrand
2025-05-16 21:08   ` Zi Yan
2025-05-16 21:20     ` David Hildenbrand
2025-05-17  0:02       ` Zi Yan
2025-05-16 12:39 ` [PATCH v1 2/3] s390/uv: always return 0 from s390_wiggle_split_folio() if successful David Hildenbrand
2025-05-17  0:08   ` Zi Yan
2025-05-16 12:39 ` [PATCH v1 3/3] s390/uv: improve splitting of large folios that cannot be split while dirty David Hildenbrand
2025-05-16 17:07 ` [PATCH v1 0/3] s390/uv: handle " Claudio Imbrenda
2025-05-16 18:55   ` David Hildenbrand
2025-05-16 17:17 ` Claudio Imbrenda
2025-05-16 18:56   ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).