All of lore.kernel.org
 help / color / mirror / Atom feed
* Different writeback timing since v5.14
@ 2022-03-01 10:11 ` Richard Weinberger
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Weinberger @ 2022-03-01 10:11 UTC (permalink / raw)
  To: wuchi.zero
  Cc: Rafał Miłecki, jack, tj, mszeredi, sedat.dilek, axboe,
	akpm, torvalds, linux-mm, linux-mtd, linux-fsdevel, linux-kernel

Hi!

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.

Thanks,
//richard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Different writeback timing since v5.14
@ 2022-03-01 10:11 ` Richard Weinberger
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Weinberger @ 2022-03-01 10:11 UTC (permalink / raw)
  To: wuchi.zero
  Cc: Rafał Miłecki, jack, tj, mszeredi, sedat.dilek, axboe,
	akpm, torvalds, linux-mm, linux-mtd, linux-fsdevel, linux-kernel

Hi!

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.

Thanks,
//richard

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different writeback timing since v5.14
  2022-03-01 10:11 ` Richard Weinberger
@ 2022-03-01 10:32   ` Jan Kara
  -1 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2022-03-01 10:32 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: wuchi.zero, Rafał Miłecki, jack, tj, mszeredi,
	sedat.dilek, axboe, akpm, torvalds, linux-mm, linux-mtd,
	linux-fsdevel, linux-kernel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different writeback timing since v5.14
@ 2022-03-01 10:32   ` Jan Kara
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2022-03-01 10:32 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: wuchi.zero, Rafał Miłecki, jack, tj, mszeredi,
	sedat.dilek, axboe, akpm, torvalds, linux-mm, linux-mtd,
	linux-fsdevel, linux-kernel

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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different writeback timing since v5.14
  2022-03-01 10:32   ` Jan Kara
@ 2022-03-01 15:05     ` Richard Weinberger
  -1 siblings, 0 replies; 8+ messages in thread
From: Richard Weinberger @ 2022-03-01 15:05 UTC (permalink / raw)
  To: Jan Kara
  Cc: wuchi zero, Rafał Miłecki, tj, mszeredi, sedat dilek,
	axboe, Andrew Morton, torvalds, linux-mm, linux-mtd,
	linux-fsdevel, linux-kernel

Jan,

----- Ursprüngliche Mail -----
> Von: "Jan Kara" <jack@suse.cz>
>> 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.

Thanks for the prompt reply!

> 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.

BdiDirtyThresh is indeed 0.

BdiWriteback:                0 kB
BdiReclaimable:              0 kB
BdiDirtyThresh:              0 kB
DirtyThresh:            772620 kB
BackgroundThresh:       385836 kB
BdiDirtied:                  0 kB
BdiWritten:                  0 kB
BdiWriteBandwidth:      102400 kBps
b_dirty:                     0
b_io:                        0
b_more_io:                   0
b_dirty_time:                0
bdi_list:                    1
state:                       1

Thanks,
//richard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different writeback timing since v5.14
@ 2022-03-01 15:05     ` Richard Weinberger
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Weinberger @ 2022-03-01 15:05 UTC (permalink / raw)
  To: Jan Kara
  Cc: wuchi zero, Rafał Miłecki, tj, mszeredi, sedat dilek,
	axboe, Andrew Morton, torvalds, linux-mm, linux-mtd,
	linux-fsdevel, linux-kernel

Jan,

----- Ursprüngliche Mail -----
> Von: "Jan Kara" <jack@suse.cz>
>> 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.

Thanks for the prompt reply!

> 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.

BdiDirtyThresh is indeed 0.

BdiWriteback:                0 kB
BdiReclaimable:              0 kB
BdiDirtyThresh:              0 kB
DirtyThresh:            772620 kB
BackgroundThresh:       385836 kB
BdiDirtied:                  0 kB
BdiWritten:                  0 kB
BdiWriteBandwidth:      102400 kBps
b_dirty:                     0
b_io:                        0
b_more_io:                   0
b_dirty_time:                0
bdi_list:                    1
state:                       1

Thanks,
//richard

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different writeback timing since v5.14
  2022-03-01 15:05     ` Richard Weinberger
@ 2022-03-02  9:24       ` Jan Kara
  -1 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2022-03-02  9:24 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Jan Kara, wuchi zero, Rafał Miłecki, tj, mszeredi,
	sedat dilek, axboe, Andrew Morton, torvalds, linux-mm, linux-mtd,
	linux-fsdevel, linux-kernel

On Tue 01-03-22 16:05:54, Richard Weinberger wrote:
> Jan,
> 
> ----- Ursprüngliche Mail -----
> > Von: "Jan Kara" <jack@suse.cz>
> >> 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.
> 
> Thanks for the prompt reply!
> 
> > 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.
> 
> BdiDirtyThresh is indeed 0.
> 
> BdiWriteback:                0 kB
> BdiReclaimable:              0 kB
> BdiDirtyThresh:              0 kB
> DirtyThresh:            772620 kB
> BackgroundThresh:       385836 kB
> BdiDirtied:                  0 kB
> BdiWritten:                  0 kB
> BdiWriteBandwidth:      102400 kBps
> b_dirty:                     0
> b_io:                        0
> b_more_io:                   0
> b_dirty_time:                0
> bdi_list:                    1
> state:                       1

Yes, so this looks expected given the BDI wasn't active yet at all...

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different writeback timing since v5.14
@ 2022-03-02  9:24       ` Jan Kara
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2022-03-02  9:24 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Jan Kara, wuchi zero, Rafał Miłecki, tj, mszeredi,
	sedat dilek, axboe, Andrew Morton, torvalds, linux-mm, linux-mtd,
	linux-fsdevel, linux-kernel

On Tue 01-03-22 16:05:54, Richard Weinberger wrote:
> Jan,
> 
> ----- Ursprüngliche Mail -----
> > Von: "Jan Kara" <jack@suse.cz>
> >> 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.
> 
> Thanks for the prompt reply!
> 
> > 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.
> 
> BdiDirtyThresh is indeed 0.
> 
> BdiWriteback:                0 kB
> BdiReclaimable:              0 kB
> BdiDirtyThresh:              0 kB
> DirtyThresh:            772620 kB
> BackgroundThresh:       385836 kB
> BdiDirtied:                  0 kB
> BdiWritten:                  0 kB
> BdiWriteBandwidth:      102400 kBps
> b_dirty:                     0
> b_io:                        0
> b_more_io:                   0
> b_dirty_time:                0
> bdi_list:                    1
> state:                       1

Yes, so this looks expected given the BDI wasn't active yet at all...

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-02  9:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.