[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMgjq7Ci7uEMp_UwzaucoHL_xDi2bSPOUk0vcEBLN7S78Lo9Mw@mail.gmail.com>
Date: Thu, 18 Dec 2025 11:40:49 +0800
From: Kairui Song <ryncsn@...il.com>
To: Baoquan He <bhe@...hat.com>
Cc: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
Barry Song <baohua@...nel.org>, Chris Li <chrisl@...nel.org>, Nhat Pham <nphamcs@...il.com>,
Yosry Ahmed <yosry.ahmed@...ux.dev>, David Hildenbrand <david@...nel.org>,
Johannes Weiner <hannes@...xchg.org>, Youngjun Park <youngjun.park@....com>,
Hugh Dickins <hughd@...gle.com>, Baolin Wang <baolin.wang@...ux.alibaba.com>,
Ying Huang <ying.huang@...ux.alibaba.com>, Kemeng Shi <shikemeng@...weicloud.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 12/19] mm, swap: use swap cache as the swap in
synchronize layer
On Thu, Dec 18, 2025 at 11:32 AM Baoquan He <bhe@...hat.com> wrote:
>
> On 12/05/25 at 03:29am, Kairui Song wrote:
> > From: Kairui Song <kasong@...cent.com>
> >
> > Current swap in synchronization mostly uses the swap_map's
> > SWAP_HAS_CACHE bit. Whoever sets the bit first does the actual
> > work to swap in a folio.
> >
> > This has been causing many issues as it's just a poor implementation
> > of a bit lock. Raced users have no idea what is pinning a slot, so
> > it has to loop with a schedule_timeout_uninterruptible(1), which is
> > ugly and causes long-tailing or other performance issues. Besides,
> > the abuse of SWAP_HAS_CACHE has been causing many other troubles for
> > synchronization or maintenance.
> >
> > This is the first step to remove this bit completely.
> >
> > We have just removed all swap in paths that bypass the swap cache, and
>
> I think we didn't remove swap in paths that bypss the swap cache, we
> just add folio to swap cache in those swap in paths where swap cache is
> bypassed.
>
Hmm, that sounds exactly like we removed the "swap cache bypass" thing :)
Anyway I can change the word here to make it read better.
Powered by blists - more mailing lists