From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932447AbcHKBrz (ORCPT ); Wed, 10 Aug 2016 21:47:55 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:30429 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857AbcHKBry (ORCPT ); Wed, 10 Aug 2016 21:47:54 -0400 To: Tom Yan Cc: Shaun Tancheff , Shaun Tancheff , linux-ide@vger.kernel.org, LKML , Christoph Hellwig , Tejun Heo , Josh Bingaman Subject: Re: [PATCH v5 2/2] Add support for SCT Write Same From: "Martin K. Petersen" Organization: Oracle Corporation References: <1470790829-3793-1-git-send-email-shaun@tancheff.com> <1470790829-3793-3-git-send-email-shaun@tancheff.com> Date: Wed, 10 Aug 2016 21:47:40 -0400 In-Reply-To: (Tom Yan's message of "Wed, 10 Aug 2016 16:50:50 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Tom" == Tom Yan writes: Tom> Well that is actually the minimum. Modern SSDs often support more Tom> than one-block payload (e.g. 8, 16...). It's just our SCSI disk Tom> driver statically limit it to the minimum. Though it allows only Tom> 0xffffffff / 512 = 8388607 (SD_MAX_WS16_BLOCKS) blocks per WRITE Tom> SAME (16) command anyway, Yes, because that's the biggest command we can express in the block layer. Tom> so we can at most allow only a 2-block (well, or 3-block) payload. We tried turning on multi block payloads and it was a massive disaster. Many drives reported that they supported 8 block payloads but actually didn't. Instead of playing the blacklist game we capped it at a single sector. Many drives from different vendors were affected by this. So we'd have to make multi block payloads an explicit opt-in like we did for discard_zeroes_data. However, given that "big" discards are mainly done synchronously when creating filesystems, I am not sure there is any real benefit to this. -- Martin K. Petersen Oracle Linux Engineering