bcache: make writeback_cutoff and writeback_cutoff_sync writeable
PATCH 1/1 bcache: make writeback_cutoff and writeback_cutoff_sync writeable
From: dongdong tao <[email protected]>
commit 9aaf51654672 ("bcache: make cutoff_writeback and cutoff_writeback_sync tunable") intend to make these two option configurable by user, but these two are still read-only.
--- drivers/md/bcache/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/md/bcache/sysfs.c +4 -2
@@ -102,8 +102,8 @@ read_attribute(writeback_keys_done);read_attribute (writeback_keys_failed);read_attribute (io_errors);read_attribute (congested); -read_attribute (cutoff_writeback); -read_attribute (cutoff_writeback_sync); +rw_attribute (cutoff_writeback); +rw_attribute (cutoff_writeback_sync);rw_attribute (congested_read_threshold_us);rw_attribute (congested_write_threshold_us);
@@ -902,6 +902,8 @@ STORE(__bch_cache_set)sysfs_strtoul_bool (copy_gc_enabled, c->copy_gc_enabled);sysfs_strtoul_bool (idle_max_writeback_rate, c->idle_max_writeback_rate_enabled); +sysfs_strtoul_clamp (cutoff_writeback, bch_cutoff_writeback,1 ,100 ); +sysfs_strtoul_clamp (cutoff_writeback_sync, bch_cutoff_writeback_sync,1 ,100 );/* * write gc_after_writeback here may overwrite an already set
Signature · 1 line
2.17.1
Coly Li
NAKQuoted 27 lines · Dongdong Tao
From: dongdong tao <[email protected]>
commit
9aaf51654672("bcache: makecutoff_writebackandcutoff_writeback_synctunable") intend to make these two option configurable by user, but these two are still read-only.Signed-off-by dongdong tao <[email protected]>--- drivers/md/bcache/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/md/bcache/sysfs.c +2
-2@@ -102,8 +102,8 @@ read_attribute(writeback_keys_done);read_attribute (writeback_keys_failed);read_attribute (io_errors);read_attribute (congested); -read_attribute (cutoff_writeback); -read_attribute (cutoff_writeback_sync); +rw_attribute (cutoff_writeback); +rw_attribute (cutoff_writeback_sync);rw_attribute (congested_read_threshold_us);rw_attribute (congested_write_threshold_us);
drivers/md/bcache/sysfs.c STORE(__bch_cache_set) · line 907
Quoted 6 lines
drivers/md/bcache/sysfs.c +2
-0@@ -902,6 +902,8 @@ STORE(__bch_cache_set)sysfs_strtoul_bool (copy_gc_enabled, c->copy_gc_enabled);sysfs_strtoul_bool (idle_max_writeback_rate, c->idle_max_writeback_rate_enabled); +sysfs_strtoul_clamp (cutoff_writeback, bch_cutoff_writeback,1 ,100 ); +sysfs_strtoul_clamp (cutoff_writeback_sync, bch_cutoff_writeback_sync,1 ,100 );
NACK, we only support the default value. Commit 9aaf51654672 ("bcache:
make cutoff_writeback and cutoff_writeback_sync tunable") clearly announced the purpose was for research and experiment.
Coly Li
Ah, I missed the second part, only saw the first paragraph. But I kind of hope it can be configurable :) Anyway, thanks for the clarification.
Quoted 41 lines · Coly Li <[email protected]> 于2020年11月5日周四 下午10:23写道:
Quoted 27 lines · Dongdong Tao
From: dongdong tao <[email protected]>
commit
9aaf51654672("bcache: makecutoff_writebackandcutoff_writeback_synctunable") intend to make these two option configurable by user, but these two are still read-only.Signed-off-by dongdong tao <[email protected]>--- drivers/md/bcache/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/md/bcache/sysfs.c +2
-2@@ -102,8 +102,8 @@ read_attribute(writeback_keys_done);read_attribute (writeback_keys_failed);read_attribute (io_errors);read_attribute (congested); -read_attribute (cutoff_writeback); -read_attribute (cutoff_writeback_sync); +rw_attribute (cutoff_writeback); +rw_attribute (cutoff_writeback_sync);rw_attribute (congested_read_threshold_us);rw_attribute (congested_write_threshold_us);drivers/md/bcache/sysfs.c STORE(__bch_cache_set) · line 907
Quoted 6 lines
drivers/md/bcache/sysfs.c +2
-0@@ -902,6 +902,8 @@ STORE(__bch_cache_set)sysfs_strtoul_bool (copy_gc_enabled, c->copy_gc_enabled);sysfs_strtoul_bool (idle_max_writeback_rate, c->idle_max_writeback_rate_enabled); +sysfs_strtoul_clamp (cutoff_writeback, bch_cutoff_writeback,1 ,100 ); +sysfs_strtoul_clamp (cutoff_writeback_sync, bch_cutoff_writeback_sync,1 ,100 );NACK, we only support the default value. Commit
9aaf51654672("bcache:
makecutoff_writebackandcutoff_writeback_synctunable") clearly announced the purpose was for research and experiment.Coly Li