]> git.baikalelectronics.ru Git - kernel.git/commit
block: immediately dispatch big size request
authorShaohua Li <shli@fb.com>
Fri, 4 Nov 2016 00:03:53 +0000 (17:03 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 4 Nov 2016 04:00:36 +0000 (22:00 -0600)
commit6645b3ab947f52c03de00cf500a84c985adfad9d
tree2bf5ebd0a22fde611dd64fd04ceeba576a2c3acb
parenta3abc523905027387daae9da1d9f259a0a0020e1
block: immediately dispatch big size request

Currently block plug holds up to 16 non-mergeable requests. This makes
sense if the request size is small, eg, reduce lock contention. But if
request size is big enough, we don't need to worry about lock
contention. Holding such request makes no sense and it lows the disk
utilization.

In practice, this improves 10% throughput for my raid5 sequential write
workload.

The size (128k) is arbitrary right now, but it makes sure lock
contention is small. This probably could be more intelligent, eg, check
average request size holded. Since this is mainly for sequential IO,
probably not worthy.

V2: check the last request instead of the first request, so as long as
there is one big size request we flush the plug.

Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c
include/linux/blkdev.h