Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753105AbbGNQEV (ORCPT ); Tue, 14 Jul 2015 12:04:21 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:57609 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753059AbbGNQES (ORCPT ); Tue, 14 Jul 2015 12:04:18 -0400 Message-ID: <55A532FC.6090206@fb.com> Date: Tue, 14 Jul 2015 10:04:12 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Christoph Hellwig CC: , Subject: Re: [PATCH 0/2] Configurable max discard size References: <1436886139-18673-1-git-send-email-axboe@fb.com> <20150714160147.GA28031@lst.de> In-Reply-To: <20150714160147.GA28031@lst.de> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-07-14_07:2015-07-14,2015-07-14,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1488 Lines: 31 On 07/14/2015 10:01 AM, Christoph Hellwig wrote: > On Tue, Jul 14, 2015 at 09:02:17AM -0600, Jens Axboe wrote: >> 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. > > This looks reasonable to me. Any chance you could also come up > with reasonable start values for the hardware you've done this for > so that we can get a good out of the box experience? Based on experimentation with two different vendors, 64MB would be a good default. Question is how best to set that. At least with the current patch, untouched, 'discard_max_bytes' will still show the hw max value. If I default it to 64MB, we'd lose that information until people started bumping it up in size. Maybe that's not such a big deal, however. -- 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/