OSDN Git Service

block: disable I/O stats accounting by default
authorkdrag0n <dragon@khronodragon.com>
Sun, 23 Dec 2018 06:36:19 +0000 (22:36 -0800)
committer0ranko0P <ranko0p@outlook.com>
Wed, 4 Dec 2019 13:45:14 +0000 (21:45 +0800)
While Android userspace (e.g. storaged) does use iostats via
/proc/diskstats, init will explicitly enable iostats for the devices on
which it is primarily used - sda and sdf. Avoid the 0.5-1% overhead for
block devices that do not need it.

Signed-off-by: kdrag0n <dragon@khronodragon.com>
include/linux/blkdev.h

index 58fd06e..447b981 100644 (file)
@@ -499,13 +499,11 @@ struct request_queue {
 #define QUEUE_FLAG_POLL               22       /* IO polling enabled if set */
 #define QUEUE_FLAG_FAST        23      /* fast block device (e.g. ram based) */
 
-#define QUEUE_FLAG_DEFAULT     ((1 << QUEUE_FLAG_IO_STAT) |            \
-                                (1 << QUEUE_FLAG_STACKABLE)    |       \
+#define QUEUE_FLAG_DEFAULT     ((1 << QUEUE_FLAG_STACKABLE)    |       \
                                 (1 << QUEUE_FLAG_SAME_COMP)    |       \
                                 (1 << QUEUE_FLAG_ADD_RANDOM))
 
-#define QUEUE_FLAG_MQ_DEFAULT  ((1 << QUEUE_FLAG_IO_STAT) |            \
-                                (1 << QUEUE_FLAG_STACKABLE)    |       \
+#define QUEUE_FLAG_MQ_DEFAULT  ((1 << QUEUE_FLAG_STACKABLE)    |       \
                                 (1 << QUEUE_FLAG_SAME_COMP))
 
 static inline void queue_lockdep_assert_held(struct request_queue *q)