All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Richard Weinberger <richard@nod.at>
Cc: wuchi.zero@gmail.com, "Rafał Miłecki" <zajec5@gmail.com>,
	jack@suse.cz, tj@kernel.org, mszeredi@redhat.com,
	sedat.dilek@gmail.com, axboe@fb.com, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, linux-mm <linux-mm@kvack.org>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Different writeback timing since v5.14
Date: Tue, 1 Mar 2022 11:32:18 +0100	[thread overview]
Message-ID: <20220301103218.ulbmakdy4gbw2fso@quack3.lan> (raw)
In-Reply-To: <2104629126.100059.1646129517209.JavaMail.zimbra@nod.at>

Hi!

On Tue 01-03-22 11:11:57, Richard Weinberger wrote:
> Rafał and I discovered that page writeback on UBIFS behaves different since v5.14.
> When a simple write, such as "echo foo > /mnt/ubibfs/bar.txt", happens it takes
> a few seconds until writeback calls ubifs_writepage().
> 
> Before commit ab19939a6a50 ("mm/page-writeback: Fix performance when BDI's share of ratio is 0.")
> it was 30 seconds (vm.dirty_expire_centisecs), after this change it happens after 5 seconds
> (vm.dirty_writeback_centisecs).
> 
> Is this expected?
> Just want to make sure that the said commit didn't uncover an UBIFS issue.

Yes, I think it is expected. Likely the background threshold for UBIFS bdi
is very small (probably UBIFS is not used much for writeback compared to
other filesystems). Previously, we just used wb_stat() which returned 0
(PCP counter inexact value) and so background writeback didn't trigger. Now
we use wb_stat_sum() when threshold is small, get exact value of dirty
pages and decide to start background writeback.

The only thing is, whether it is really expected that the threshold for
UBIFS bdi is so small. You can check the values in
/sys/kernel/debug/bdi/<bdi>/stats.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kara <jack@suse.cz>
To: Richard Weinberger <richard@nod.at>
Cc: wuchi.zero@gmail.com, "Rafał Miłecki" <zajec5@gmail.com>,
	jack@suse.cz, tj@kernel.org, mszeredi@redhat.com,
	sedat.dilek@gmail.com, axboe@fb.com, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, linux-mm <linux-mm@kvack.org>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Different writeback timing since v5.14
Date: Tue, 1 Mar 2022 11:32:18 +0100	[thread overview]
Message-ID: <20220301103218.ulbmakdy4gbw2fso@quack3.lan> (raw)
In-Reply-To: <2104629126.100059.1646129517209.JavaMail.zimbra@nod.at>

Hi!

On Tue 01-03-22 11:11:57, Richard Weinberger wrote:
> Rafał and I discovered that page writeback on UBIFS behaves different since v5.14.
> When a simple write, such as "echo foo > /mnt/ubibfs/bar.txt", happens it takes
> a few seconds until writeback calls ubifs_writepage().
> 
> Before commit ab19939a6a50 ("mm/page-writeback: Fix performance when BDI's share of ratio is 0.")
> it was 30 seconds (vm.dirty_expire_centisecs), after this change it happens after 5 seconds
> (vm.dirty_writeback_centisecs).
> 
> Is this expected?
> Just want to make sure that the said commit didn't uncover an UBIFS issue.

Yes, I think it is expected. Likely the background threshold for UBIFS bdi
is very small (probably UBIFS is not used much for writeback compared to
other filesystems). Previously, we just used wb_stat() which returned 0
(PCP counter inexact value) and so background writeback didn't trigger. Now
we use wb_stat_sum() when threshold is small, get exact value of dirty
pages and decide to start background writeback.

The only thing is, whether it is really expected that the threshold for
UBIFS bdi is so small. You can check the values in
/sys/kernel/debug/bdi/<bdi>/stats.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2022-03-01 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01 10:11 Different writeback timing since v5.14 Richard Weinberger
2022-03-01 10:11 ` Richard Weinberger
2022-03-01 10:32 ` Jan Kara [this message]
2022-03-01 10:32   ` Jan Kara
2022-03-01 15:05   ` Richard Weinberger
2022-03-01 15:05     ` Richard Weinberger
2022-03-02  9:24     ` Jan Kara
2022-03-02  9:24       ` Jan Kara

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=20220301103218.ulbmakdy4gbw2fso@quack3.lan \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mszeredi@redhat.com \
    --cc=richard@nod.at \
    --cc=sedat.dilek@gmail.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wuchi.zero@gmail.com \
    --cc=zajec5@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.