Re: [PATCH 20/25] s390/fbatch: no lru_add_drain_all() in s390_wiggle_split_folio()

From: Claudio Imbrenda

Date: Wed Aug 26 2026 - 09:59:53 EST


On Mon, 24 Aug 2026 07:39:12 -0700 (PDT)
Hugh Dickins <hughd@xxxxxxxxxx> wrote:

> s390_wiggle_split_folio() has no good reason to lru_add_drain_all(),
> now that the per-cpu fbatch references are gone.
>
> Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
> ---
> arch/s390/kernel/uv.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c
> index dc14ebc0105b..120a467026a5 100644
> --- a/arch/s390/kernel/uv.c
> +++ b/arch/s390/kernel/uv.c
> @@ -364,7 +364,6 @@ int s390_wiggle_split_folio(struct mm_struct *mm, struct folio *folio)
>
> lockdep_assert_not_held(&mm->mmap_lock);
> folio_wait_writeback(folio);
> - lru_add_drain_all();
>
> if (!folio_test_large(folio))
> return 0;

This is black magic for me, I am not sure I fully understand all the
details, but what's the new purpose of lru_add_drain_all() ?

will we have a guarantee that no stray references to mapped folios will
ever remain?

Any unexpected reference (i.e. not due to mappings, see
expected_folio_refs()) will cause a protected guest to hang.