Re: [RFC PATCH 11/11] mm, swap: serialize xswap map/unmap with a mutex

Baoquan He <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.mm
Message-ID <anLxJlKBnNUwC4BA@MiWiFi-R3L-srv>
On 07/27/26 at 08:13am, Nhat Pham wrote:
> On Mon, Jul 27, 2026 at 7:06 AM Baoquan He <[email protected]> wrote:
> >
> > Concurrent xswap grow operations race on vm_area_map_pages(),
> > triggering WARN_ON(!pte_none) in the vmap page table walk when
> > one thread sees a PTE already set by another.  The -EBUSY safety
> > net catches it but the warning is noisy and unavoidable without
> > serialization.
> >
> > Add a per-device mutex (xswap_lock) held across xswap_map_clusters
> > and xswap_unmap_clusters so that only one thread can modify the
> > VM_SPARSE page table at a time.  The shrink path is already
> > deferred to a workqueue so it does not contend with itself.
> >
> > Signed-off-by: Baoquan He <[email protected]>
> 
> Seems like this should be squashed into one of the older patches, no?

Both is fine to me, because putting it in a separate patch can get a
specific log to describe it with more details. Have squashed it into
patch 03 as suggested since they are small number of lines of change.

Thanks
Baoquan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.