Re: [PATCH v1 1/2] KVM: s390: fix issues when splitting folios

David Hildenbrand
2025-02-13T20:17:17Z

> + struct folio *folio = page_folio(page);
> int rc;
>
> lockdep_assert_not_held(&mm->mmap_lock);
> @@ -2645,7 +2646,11 @@ int kvm_s390_wiggle_split_folio(struct mm_struct *mm, struct folio *folio, bool
> lru_add_drain_all();
> if (split) {
> folio_lock(folio);
> - rc = split_folio(folio);
> + rc = min_order_for_split(folio);
> + if (rc > 0)
> + rc = -EINVAL;
> + if (!rc)
> + rc = split_huge_page_to_list_to_order(page, NULL, 0);

split_huge_page() ?

But see my reply to #2. Likely we should just undo the refactorings you
added while moving the code.

--
Cheers,

David / dhildenb