From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752845AbbGNPXf (ORCPT ); Tue, 14 Jul 2015 11:23:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50420 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbbGNPXe (ORCPT ); Tue, 14 Jul 2015 11:23:34 -0400 Date: Tue, 14 Jul 2015 11:23:32 -0400 From: Mike Snitzer To: Jens Axboe Cc: linux-kernel@vger.kernel.org, hch@lst.de Subject: Re: [PATCH 2/2] block: make /sys/block//queue/discard_max_bytes writeable Message-ID: <20150714152332.GA5568@redhat.com> References: <1436886139-18673-1-git-send-email-axboe@fb.com> <1436886139-18673-3-git-send-email-axboe@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436886139-18673-3-git-send-email-axboe@fb.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 14 2015 at 11:02am -0400, Jens Axboe 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.