From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2974EC433B4 for ; Thu, 8 Apr 2021 12:15:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 025E86115B for ; Thu, 8 Apr 2021 12:15:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231448AbhDHMPw (ORCPT ); Thu, 8 Apr 2021 08:15:52 -0400 Received: from verein.lst.de ([213.95.11.211]:35078 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbhDHMPv (ORCPT ); Thu, 8 Apr 2021 08:15:51 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id B70EE68B05; Thu, 8 Apr 2021 14:15:38 +0200 (CEST) Date: Thu, 8 Apr 2021 14:15:38 +0200 From: Christoph Hellwig To: Javier =?iso-8859-1?Q?Gonz=E1lez?= Cc: Christoph Hellwig , Keith Busch , Dmitry Monakhov , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya.Kulkarni@wdc.com Subject: Re: [PATCH 1/1] nvme-pci: add the DISABLE_WRITE_ZEROES quirk for a Samsung PM1725a Message-ID: <20210408121538.GA12948@lst.de> References: <1615377076-3251-1-git-send-email-dmtrmonakhov@yandex-team.ru> <20210310132156.GA12145@lst.de> <20210310134110.GA13063@lst.de> <20210310200030.GA3377333@dhcp-10-100-145-180.wdc.com> <20210311104712.GA16218@lst.de> <20210323083749.r272grolxozf3w2f@mpHalley.local> <20210323123121.GA31105@lst.de> <20210323124322.qchyk7boyzklwv3v@mpHalley.local> <20210408103016.5girhv5ctkucovmd@mpHalley.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210408103016.5girhv5ctkucovmd@mpHalley.local> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 08, 2021 at 12:30:16PM +0200, Javier González wrote: >>> Aligning to MDTS is our current behavior, although all kernels up to >>> 5.11 had a bug in the calculation. >> >> I see. Let me check internally and see what's going on with >> write-zeroes on this model. > > We still need to confirm, but it seems like MDTS for write-zeroes is > reported wrong in the FW that Dmitry is using. We can at least reproduce > it. > > Would it be a possibility to add quirk infrastructure to hardcode MDTS > for FW versions prior TP4040? > > Another possibility is to add quirks to the TP4040 support patches to > enable this - it might also help reduce the list of models currently > blacklisted for write-zeroes. I'm not sure I understand you. Before TP4040 there is only the MDTS, which only applies to data transfer commands, although we also "volunarily" apply it to Write Zeroes. If MDTS is wrong this would also affect normal I/O, so we really either need a firmware update or a quirk. Or is the Write Zeroes limit even smaller than MTDS? I'd rather not add another quirk with a specific limit in that case, as well grow way too many of those. TP4040 is the way to go for that case.