linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Bernd Schubert <bernd@bsbernd.com>,
	Joanne Koong <joannelkoong@gmail.com>,
	miklos@szeredi.hu
Cc: linux-fsdevel@vger.kernel.org, willy@infradead.org, linux-mm@kvack.org
Subject: Re: [PATCH v2 1/2] fuse: use default writeback accounting
Date: Fri, 11 Jul 2025 13:58:52 +0200	[thread overview]
Message-ID: <a7866534-6000-4e15-a428-94fec3aa42d2@redhat.com> (raw)
In-Reply-To: <4ef06726-1851-44af-b4d1-45b828746ce2@bsbernd.com>

On 09.07.25 13:06, Bernd Schubert wrote:
> 
> 
> On 7/8/25 01:46, Joanne Koong wrote:
>> commit 0c58a97f919c ("fuse: remove tmp folio for writebacks and internal
>> rb tree") removed temp folios for dirty page writeback. Consequently,
>> fuse can now use the default writeback accounting.
>>
>> With switching fuse to use default writeback accounting, there are some
>> added benefits. This updates wb->writeback_inodes tracking as well now
>> and updates writeback throughput estimates after writeback completion.
>>
>> This commit also removes inc_wb_stat() and dec_wb_stat(). These have no
>> callers anymore now that fuse does not call them.
>>
>> Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
>> ---
>>   fs/fuse/file.c              |  9 +--------
>>   fs/fuse/inode.c             |  2 --
>>   include/linux/backing-dev.h | 10 ----------
>>   3 files changed, 1 insertion(+), 20 deletions(-)
>>
>> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
>> index adc4aa6810f5..e53331c851eb 100644
>> --- a/fs/fuse/file.c
>> +++ b/fs/fuse/file.c
>> @@ -1784,19 +1784,15 @@ static void fuse_writepage_finish(struct fuse_writepage_args *wpa)
>>   	struct fuse_args_pages *ap = &wpa->ia.ap;
>>   	struct inode *inode = wpa->inode;
>>   	struct fuse_inode *fi = get_fuse_inode(inode);
>> -	struct backing_dev_info *bdi = inode_to_bdi(inode);
>>   	int i;
>>   
>> -	for (i = 0; i < ap->num_folios; i++) {
>> +	for (i = 0; i < ap->num_folios; i++)
>>   		/*
>>   		 * Benchmarks showed that ending writeback within the
>>   		 * scope of the fi->lock alleviates xarray lock
>>   		 * contention and noticeably improves performance.
>>   		 */
>>   		folio_end_writeback(ap->folios[i]);
>> -		dec_wb_stat(&bdi->wb, WB_WRITEBACK);
>> -		wb_writeout_inc(&bdi->wb);
>> -	}
> 
> Probably, just my own style, personally I keep the braces when there are
> comments.

Yeah, sometimes it can aid readability. I tend to keep them on 
multi-line comments IIRC.

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb


  reply	other threads:[~2025-07-11 11:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-07 23:46 [PATCH v2 0/2] fuse/mm: remove BDI_CAP_WRITEBACK_ACCT Joanne Koong
2025-07-07 23:46 ` [PATCH v2 1/2] fuse: use default writeback accounting Joanne Koong
2025-07-09 11:06   ` Bernd Schubert
2025-07-11 11:58     ` David Hildenbrand [this message]
2025-07-07 23:46 ` [PATCH v2 2/2] mm: remove BDI_CAP_WRITEBACK_ACCT Joanne Koong
     [not found]   ` <CGME20250822110133eucas1p2378459d1e802c718ef6028efc06625dc@eucas1p2.samsung.com>
2025-08-22 11:01     ` Marek Szyprowski
     [not found]       ` <CGME20250822214238eucas1p16934a3c0a9575e6044b61e11f3635af0@eucas1p1.samsung.com>
2025-08-22 21:42         ` Marek Szyprowski
2025-08-22 23:20           ` Joanne Koong
2025-08-01 20:44 ` [PATCH v2 0/2] fuse/mm: " Joanne Koong
2025-08-18 12:28 ` Miklos Szeredi

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=a7866534-6000-4e15-a428-94fec3aa42d2@redhat.com \
    --to=david@redhat.com \
    --cc=bernd@bsbernd.com \
    --cc=joannelkoong@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=miklos@szeredi.hu \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).