block: by default, limit maximum discard size to 64MB discard-rw
authorJens Axboe <axboe@fb.com>
Tue, 14 Jul 2015 18:42:35 +0000 (12:42 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 15 Jul 2015 16:17:15 +0000 (10:17 -0600)
commit9d3e5d88441e427849bc94ee304e8822befc58ac
tree5edc1fc87d61874a71501d2350997438eacad359
parentd4d58d2fb206c4bef37e5143a3b7be1843d5ec67
block: by default, limit maximum discard size to 64MB

Lots of devices exhibit very high latencies for big discards, hurting
reads and writes. By default, limit the max discard we will build to
64MB. This value has shown good results across a number of devices.

This will potentially hurt discard throughput, from a provisioning
point of view (when the user does mkfs.xfs, for instance, and mkfs
issues a full device discard). If that becomes an issue, we could
have different behavior for provisioning vs runtime discards.

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