Skip to content

Configurable max discard size

Jens Axboe lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 11 repliesIn review
  2. v12 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Keep separate sysfs files for hw and sw max discard values.

- Add patch 3, defaulting to 64MB discard sizes.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block: have drivers use blk_queue_max_discard_sectors()drivers/block/brd.c drivers/block/drbd/drbd_nl.c drivers/block/loop.c +9 more+15 -151 reply
2/3block: make /sys/block/<dev>/queue/discard_max_bytes writeableDocumentation/block/queue-sysfs.txt block/blk-settings.c block/blk-sysfs.c +1 more+47 -22 replies
3/3block: by default, limit maximum discard size to 64MBblock/blk-settings.c include/linux/blkdev.h+7 -08 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJeff Moyer
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH 0/3 v2] Configurable max discard size

Hi,

Most drivers use UINT_MAX (or some variant thereof) for max discard size, since they don't have a real limit for a non-data transferring command. This is fine from a throughput point of view, but for a lot of devices (all?), it truly sucks on latency. We've seen cases of hundreds of msec in latencies for reads/writes when deleting files on an fs with discard enabled. For the problematic devices that we have tested, artificially limiting the size of the discards issued brings it down to a more manageable 1-2ms max latencies.

Changes since v1:

- Keep separate sysfs files for hw and sw max discard values.

- Add patch 3, defaulting to 64MB discard sizes.

Signature · 1 line
Jens Axboe