Re: [PATCH v8 18/46] KVM: guest_memfd: Handle lru_add fbatch refcounts during conversion safety check

From: Sean Christopherson

Date: Wed Jun 24 2026 - 12:57:21 EST


On Thu, Jun 18, 2026, Ackerley Tng wrote:
> When checking if a guest_memfd folio is safe for conversion, its refcount
> is examined. A folio may be present in a per-CPU lru_add fbatch, which
> temporarily increases its refcount.

Under what circumstances does this happen, and what alternatives are there for
userspace to work around the issue?