[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACSyD1PYm4wwQvOjkHZVcfuo-Voa4ABZ--n3K70i+s5ag9KnfA@mail.gmail.com>
Date: Wed, 17 Jan 2024 18:41:44 +0800
From: Zhongkun He <hezhongkun.hzk@...edance.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Nhat Pham <nphamcs@...il.com>, Yosry Ahmed <yosryahmed@...gle.com>, akpm@...ux-foundation.org,
hannes@...xchg.org, sjenning@...hat.com, ddstreet@...e.org,
vitaly.wool@...sulko.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Chris Li <chrisl@...nel.org>
Subject: Re: [External] Re: [PATCH] mm: zswap: fix the lack of page lru flag
in zswap_writeback_entry
On Wed, Jan 17, 2024 at 5:04 AM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Tue, Jan 16, 2024 at 09:40:05PM +0800, Zhongkun He wrote:
> > 2) __read_swap_cache_async has six parameters, so there is no space to
> > add a new one, add_to_lru_head.
>
> That's easy enough. Define a new set of flags, make one of them the
> equivalent of skip_if_exists. Something like:
>
> typedef unsigned int __bitwise read_swap_t;
>
> #define READ_SWAP_SKIP_EXISTING ((__force read_swap_t)0x00000001)
> #define READ_SWAP_ADD_TAIL ((__force read_swap_t)0x00000002)
>
> There's only six callers of __read_swap_cache_async() to convert, so not
> really a big deal.
>
Yes, thanks for your suggestion.
The major problem is not the parameters, but the need to add three functions
to deal with a special case. Thanks again.
Powered by blists - more mailing lists