Re: [PATCH v1 1/2] KVM: s390: fix issues when splitting folios
From: Claudio Imbrenda
Date: Fri Feb 14 2025 - 04:44:44 EST
On Thu, 13 Feb 2025 21:17:10 +0100
David Hildenbrand <david@xxxxxxxxxx> wrote:
> > + 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() ?
ah, yes
>
> But see my reply to #2. Likely we should just undo the refactorings you
> added while moving the code.
>