From: Nhat Pham <nphamcs@gmail.com>
To: Zhongkun He <hezhongkun.hzk@bytedance.com>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org,
yosryahmed@google.com, sjenning@redhat.com, ddstreet@ieee.org,
vitaly.wool@konsulko.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: zswap: fix the lack of page lru flag in zswap_writeback_entry
Date: Fri, 29 Dec 2023 18:09:07 -0800 [thread overview]
Message-ID: <CAKEwX=OiNB+pPhb-3Tf7O=F7psKE3EOpwmbPSeLSOyuHpj3i+Q@mail.gmail.com> (raw)
In-Reply-To: <20231024142706.195517-1-hezhongkun.hzk@bytedance.com>
On Tue, Oct 24, 2023 at 7:27 AM Zhongkun He
<hezhongkun.hzk@bytedance.com> wrote:
>
My apologies for the delayed response. I have a couple of questions.
> The zswap_writeback_entry() will add a page to the swap cache, decompress
> the entry data into the page, and issue a bio write to write the page back
> to the swap device. Move the page to the tail of lru list through
> SetPageReclaim(page) and folio_rotate_reclaimable().
>
> Currently, about half of the pages will fail to move to the tail of lru
May I ask what's the downstream effect of this? i.e so what if it
fails? And yes, as Andrew pointed out, it'd be nice if the patch
changelog spells out any observable or measurable change from the
user's POV.
> list because there is no LRU flag in page which is not in the LRU list but
> the cpu_fbatches. So fix it.
This sentence is a bit confusing to me. Does this mean the page
currently being processed for writeback is not in the LRU list
(!PageLRU(page)), but IN one of the cpu folio batches? Which makes
folio_rotate_reclaimable() fails on this page later on in the
_swap_writepage() path? (hence the necessity of lru_add_drain()?)
Let me know if I'm misunderstanding the intention of this patch. I
know it's a bit pedantic, but spelling things out (ideally in the
changelog itself) will help the reviewers, as well as future
contributors who want to study the codebase and make changes to it.
>
> Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
Thanks and look forward to your response,
Nhat
P/S: Have a nice holiday season and happy new year!
next prev parent reply other threads:[~2023-12-30 2:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 14:27 Zhongkun He
2023-12-29 19:44 ` Andrew Morton
2023-12-30 2:09 ` Nhat Pham [this message]
2024-01-02 11:39 ` [External] " Zhongkun He
2024-01-02 14:09 ` Zhongkun He
2024-01-02 23:27 ` Nhat Pham
2024-01-03 14:12 ` Zhongkun He
2024-01-04 19:42 ` Nhat Pham
2024-01-05 14:10 ` Zhongkun He
2024-01-07 18:53 ` Nhat Pham
2024-01-07 21:29 ` Nhat Pham
2024-01-07 21:59 ` Nhat Pham
2024-01-08 23:12 ` Yosry Ahmed
2024-01-09 3:13 ` Zhongkun He
2024-01-09 16:29 ` Yosry Ahmed
2024-01-10 1:32 ` Nhat Pham
2024-01-11 3:48 ` Zhongkun He
2024-01-11 11:27 ` Yosry Ahmed
2024-01-11 19:25 ` Nhat Pham
2024-01-12 7:08 ` Zhongkun He
2024-01-16 13:40 ` Zhongkun He
2024-01-16 20:28 ` Yosry Ahmed
2024-01-17 9:52 ` Zhongkun He
2024-01-17 17:53 ` Yosry Ahmed
2024-01-17 19:29 ` Nhat Pham
2024-01-16 21:03 ` Matthew Wilcox
2024-01-17 10:41 ` Zhongkun He
2024-01-11 2:57 ` Zhongkun He
2024-01-09 2:43 ` Zhongkun He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKEwX=OiNB+pPhb-3Tf7O=F7psKE3EOpwmbPSeLSOyuHpj3i+Q@mail.gmail.com' \
--to=nphamcs@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=hannes@cmpxchg.org \
--cc=hezhongkun.hzk@bytedance.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sjenning@redhat.com \
--cc=vitaly.wool@konsulko.com \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox