From: Joanne Koong <joannelkoong@gmail.com>
To: Jingbo Xu <jefflexu@linux.alibaba.com>
Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
shakeel.butt@linux.dev, josef@toxicpanda.com,
linux-mm@kvack.org, bernd.schubert@fastmail.fm,
kernel-team@meta.com
Subject: Re: [PATCH v5 5/5] fuse: remove tmp folio for writebacks and internal rb tree
Date: Wed, 20 Nov 2024 13:07:25 -0800 [thread overview]
Message-ID: <CAJnrk1Zn4Ua3E3-CFnyYY4JGD11J6kaV6SExBKPO1KHRbdaLww@mail.gmail.com> (raw)
In-Reply-To: <89aef56a-6d1b-449d-8fbc-94d305bae78c@linux.alibaba.com>
On Mon, Nov 18, 2024 at 11:59 PM Jingbo Xu <jefflexu@linux.alibaba.com> wrote:
>
> On 11/16/24 6:44 AM, Joanne Koong wrote:
>
> > @@ -1838,7 +1748,7 @@ static void fuse_writepage_finish_stat(struct inode *inode, struct folio *folio)
> > struct backing_dev_info *bdi = inode_to_bdi(inode);
> >
> > dec_wb_stat(&bdi->wb, WB_WRITEBACK);
> > - node_stat_sub_folio(folio, NR_WRITEBACK_TEMP);
> > + node_stat_sub_folio(folio, NR_WRITEBACK);
>
> Now fuse_writepage_finish_stat() has only one caller and we could make
> it embedded into its only caller.
I'll make this change in v6.
>
>
> > static void fuse_writepage_args_page_fill(struct fuse_writepage_args *wpa, struct folio *folio,
> > - struct folio *tmp_folio, uint32_t folio_index)
> > + uint32_t folio_index)
> > {
> > struct inode *inode = folio->mapping->host;
> > struct fuse_args_pages *ap = &wpa->ia.ap;
> >
> > - folio_copy(tmp_folio, folio);
> > -
> > - ap->folios[folio_index] = tmp_folio;
> > + ap->folios[folio_index] = folio;
> > ap->descs[folio_index].offset = 0;
> > ap->descs[folio_index].length = PAGE_SIZE;
> >
> > inc_wb_stat(&inode_to_bdi(inode)->wb, WB_WRITEBACK);
> > - node_stat_add_folio(tmp_folio, NR_WRITEBACK_TEMP);
> > + node_stat_add_folio(folio, NR_WRITEBACK);
>
> This inc NR_WRITEBACK counter along with the corresponding dec
> NR_WRITEBACK counter in fuse_writepage_finish_stat() seems unnecessary,
> as folio_start_writeback() will increase the NR_WRITEBACK counter, while
> folio_end_writeback() will decrease the NR_WRITEBACK counter.
>
Nice find, I'll make this change in v6.
Thanks,
Joanne
>
> --
> Thanks,
> Jingbo
next prev parent reply other threads:[~2024-11-20 21:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 22:44 [PATCH v5 0/5] fuse: remove temp page copies in writeback Joanne Koong
2024-11-15 22:44 ` [PATCH v5 1/5] mm: add AS_WRITEBACK_INDETERMINATE mapping flag Joanne Koong
2024-11-15 23:11 ` Shakeel Butt
2024-11-15 22:44 ` [PATCH v5 2/5] mm: skip reclaiming folios in legacy memcg writeback indeterminate contexts Joanne Koong
2024-11-15 22:44 ` [PATCH v5 3/5] fs/writeback: in wait_sb_inodes(), skip wait for AS_WRITEBACK_INDETERMINATE mappings Joanne Koong
2024-11-20 12:07 ` Jingbo Xu
2024-11-15 22:44 ` [PATCH v5 4/5] mm/migrate: skip migrating folios under writeback with " Joanne Koong
2024-11-15 23:12 ` Shakeel Butt
2024-11-15 22:44 ` [PATCH v5 5/5] fuse: remove tmp folio for writebacks and internal rb tree Joanne Koong
2024-11-19 7:59 ` Jingbo Xu
2024-11-20 21:07 ` Joanne Koong [this message]
2024-11-20 9:56 ` Jingbo Xu
2024-11-20 21:53 ` Joanne Koong
2024-11-21 3:08 ` Jingbo Xu
2024-11-21 10:11 ` Bernd Schubert
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=CAJnrk1Zn4Ua3E3-CFnyYY4JGD11J6kaV6SExBKPO1KHRbdaLww@mail.gmail.com \
--to=joannelkoong@gmail.com \
--cc=bernd.schubert@fastmail.fm \
--cc=jefflexu@linux.alibaba.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@meta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=shakeel.butt@linux.dev \
/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