Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1183782

Re: [PATCH 2/2] block: make /sys/block/<dev>/queue/discard_max_bytes writeable

From Jens Axboe <axboe@fb.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] block: make /sys/block/<dev>/queue/discard_max_bytes writeable
Date 2015-07-14 17:30 +0200
Message-ID <pMajD-4ep-17@gated-at.bofh.it> (permalink)
References <pMa0h-3Rk-7@gated-at.bofh.it> <pMa0i-3Rk-15@gated-at.bofh.it> <pMajE-4ep-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 07/14/2015 09:23 AM, Mike Snitzer wrote:
> On Tue, Jul 14 2015 at 11:02am -0400,
> Jens Axboe <axboe@fb.com> wrote:
>
>> Lots of devices support huge discard sizes these days. Depending
>> on how the device handles them internally, huge discards can
>> introduce massive latencies (hundreds of msec) on the device side.
>>
>> We have a sysfs file, discard_max_bytes, that advertises the max
>> hardware supported discard size. Make this writeable, and split
>> the settings into a soft and hard limit. This can be set from
>> 'discard_granularity' and up to the hardware limit.
>
> Looks pretty good, but we'll lose the original discard_max_bytes once it
> is changed.  That information loss will prevent users from knowing what
> adjustments are possible over time.
>
> This may be OK, but figured i'd raise it.

That's true, I should have mentioned that. But if you write a higher 
value than the device supports, then it will be truncated to the max 
value that the device supports. So it's not really lost, and it was the 
best alternative I could think of.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] block: make /sys/block/<dev>/queue/discard_max_bytes writeable Jens Axboe <axboe@fb.com> - 2015-07-14 17:10 +0200
  Re: [PATCH 2/2] block: make /sys/block/<dev>/queue/discard_max_bytes  writeable Jens Axboe <axboe@fb.com> - 2015-07-14 17:30 +0200
  Re: [PATCH 2/2] block: make /sys/block/<dev>/queue/discard_max_bytes  writeable Mike Snitzer <snitzer@redhat.com> - 2015-07-14 17:30 +0200

csiph-web