linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Bitmap percentage flushing
@ 2022-10-13 22:41 Jonathan Derrick
  2022-10-13 22:41 ` [PATCH v2 1/3] md/bitmap: Add chunk-threshold unplugging Jonathan Derrick
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jonathan Derrick @ 2022-10-13 22:41 UTC (permalink / raw)
  To: Song Liu
  Cc: linux-raid, linux-kernel, jonathan.derrick, jonathanx.sk.derrick,
	Mariusz Tkaczyk, Jonathan Derrick

This introduces a percentage-flushing mechanism that works in-tandem to the
mdadm delay timer. The percentage argument is based on the number of chunks
dirty (rather than percentage), due to large drives requiring smaller and
smaller percentages (eg, 32TB drives-> 1% is 320GB).

This set hopes to provide a way to make the bitmap flushing more consistent. It
was observed that a synchronous, random write qd1 workload, could make bitmap
writes easily become almost half of the I/O. And in similar workloads with
different timing, it was several minutes between bitmap updates. This is too
inconsistent to be reliable.

This first and second patches adds the flush_threshold parameter. The default
value of 0 defines the default behavior: unplugging immediately just as before.
With a flush-threshold value of 1, it becomes more consistent and paranoid,
flushing on nearly every I/O, leading to a 40% or greater situation. From
there, the flush_threshold can be defined higher for those situations where
power loss is rare and full resync can be tolerated.

The third patch converts the daemon worker to an actual timer. This makes it
more consistent and removes some ugly code.

Jonathan Derrick (3):
  md/bitmap: Add chunk-threshold unplugging
  md/bitmap: Add sysfs interface for flush threshold
  md/bitmap: Convert daemon_work to proper timer

 Documentation/admin-guide/md.rst |  5 ++
 drivers/md/md-bitmap.c           | 98 +++++++++++++++++++++++++-------
 drivers/md/md-bitmap.h           |  4 +-
 drivers/md/md.c                  |  9 ++-
 drivers/md/md.h                  |  2 +
 5 files changed, 93 insertions(+), 25 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2022-10-15 22:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-13 22:41 [PATCH v2 0/3] Bitmap percentage flushing Jonathan Derrick
2022-10-13 22:41 ` [PATCH v2 1/3] md/bitmap: Add chunk-threshold unplugging Jonathan Derrick
2022-10-14  1:11   ` Jonathan Derrick
2022-10-13 22:41 ` [PATCH v2 2/3] md/bitmap: Add sysfs interface for flush threshold Jonathan Derrick
2022-10-13 22:41 ` [PATCH v2 3/3] md/bitmap: Convert daemon_work to proper timer Jonathan Derrick
2022-10-14 21:10 ` [PATCH v2 0/3] Bitmap percentage flushing John Stoffel
2022-10-15 22:27   ` Jonathan Derrick

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