hulk inclusion category: bugfix bugzilla: 189480, https://gitee.com/openeuler/kernel/issues/I8Y90H
--------------------------------
Previously, we believed it would be too costly to sum all the percpu variables 'in_flight' every jiffy if we want to count io accurately. So we added switch 'precise_iostat' and set it to false be default.
However, the overhead of precise_iostat is 1. inc and dev in_flight when submitting io and done io 2. read in_flight up to HZ times per second
It is much lower than our previous evaluation and can be ignored. Now, turn on the switch by default. And it will be removed in the feature.
Signed-off-by: Li Nan linan122@huawei.com --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c index 2612fb2eea77..3ea271135a6c 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -71,7 +71,7 @@ static struct kmem_cache *blk_requestq_cachep; */ static struct workqueue_struct *kblockd_workqueue;
-static bool precise_iostat; +static bool precise_iostat = true;
static int __init precise_iostat_setup(char *str) {