I receive requirement to provide options to permit people to do research
on writeback performance tuning for their extreme heavy workloads. And
these options are required to be disabled by default to avoid changing
current code behavior.
This series adds several disabled-by-default options for writeback
performance tuning.
- Auto gc after writeback accomplished
sysfs entry gc_after_writeback is added, if it is explicitly enabled,
gc thread will be forced woken up when writeback accomplished and
all cache data are clean. This behavior will shrink bcache B+ tree
and discard clean SSD space, which might be helpful for following
write request. The following patches cover this option,
- bcache: introduce force_wake_up_gc()
- bcache: option to automatically run gc thread after writeback
accomplished
- Tunnable cutoff writeback and cutoff writeback sync
Currently cutoff writeback and cutoff wrireback sync are fixed value
defined by macro. There is no way for people to set a larger value and
test the resulting performance behavior. Now they can be specificed
as dynamic module load time parameter (bch_cutoff_writeback, and
bch_cutof_writeback_sync), and won't change after bcache module
loaded. Now people can test and observe the behavior on their own
cache device with larger cutoff writeback values. The following
patches cover these 2 options,
- bcache: add MODULE_DESCRIPTION information
- bcache: make cutoff_writeback and cutoff_writeback_sync tunnable
- bcache: set writeback_percent in a flexible range
- A more flexible writeback_percent range
Currently writeback_percent is in range of [0, 40], because cutoff
writeback value is defind as 40 by a macro. This patch permits the
value to be specified in range [0, bch_cutoff_writeback], while the
maximum value of bch_cutoff_writeback can be 70. Now people may have
a more flexible writeback_percent parameter range to test and observe
how bcache writeback code behaves on their own cache hardware. The
following patch covers this change,
- bcache: set writeback_percent in a flexible range
If anyone is also interested on writeback performance tuning with these
tunnable options, I do appreciate if you find a better performance
number with the non-default option values, and share them with us.
Thanks in advance.
Coly Li
---
Coly Li (5):
bcache: introduce force_wake_up_gc()
bcache: option to automatically run gc thread after writeback
accomplished
bcache: add MODULE_DESCRIPTION information
bcache: make cutoff_writeback and cutoff_writeback_sync tunnable
bcache: set writeback_percent in a flexible range
drivers/md/bcache/bcache.h | 14 ++++++++++++++
drivers/md/bcache/btree.h | 18 +++++++++++++++++
drivers/md/bcache/super.c | 45 +++++++++++++++++++++++++++++++++++++++++--
drivers/md/bcache/sysfs.c | 36 +++++++++++++++++++---------------
drivers/md/bcache/writeback.c | 27 ++++++++++++++++++++++++++
drivers/md/bcache/writeback.h | 12 ++++++++++--
6 files changed, 132 insertions(+), 20 deletions(-)
--
2.16.4