From 79ffbc2488117f2b10f475b54bec85fa4053e513 Mon Sep 17 00:00:00 2001 From: Li Nan Date: Tue, 23 Jan 2024 16:11:17 +0800 Subject: [PATCH] block: remove precise_iostat 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 --- 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 3564de78f102..f91f8e8be482 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -62,7 +62,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(block_unplug); DEFINE_IDA(blk_queue_ida); -bool precise_iostat; +bool precise_iostat = true; static int __init precise_iostat_setup(char *str) { -- Gitee