Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp772404ybh; Wed, 15 Jul 2020 15:05:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsvUGGpRWNAXBvk8ifWyzO102B6/UmumydK77Wnj+WdHTuJTQApo95Hd2ciUNMpQIXebkw X-Received: by 2002:a17:906:c056:: with SMTP id bm22mr1012015ejb.444.1594850734372; Wed, 15 Jul 2020 15:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594850734; cv=none; d=google.com; s=arc-20160816; b=ucC3HshooEjKHV4zYhVp7o/cvKG5t8uYEsiv/0BcLaJlqY9EoOHXwm9vBSoIQEKsEO aSWQqJFA2vcuhRLZ98jPpKtBJeSpySMyWs6XuDMH5tntWPa3uOfB1SJggjg087PzQb+l WEMtja8TWoraly6/K0uqbMRmSs+dUUAnJzEYxt5rVZdGLywN7U3lwj32SjCK5e4P9Dyr 7h6PJ1ELOLtK6IdBj1vJaSLoK87ADLQV7ITLTDuh0FHop3Sm2iH5jlhxg2Y99Ca6cPc/ sXZfu8RajdNDLkt3ClygHs/Goa9TbfaU7KAi6EF5AGIKA7DZ+s4+NWjVHlnO7dDtuvSi 5MLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KI9Mde07pxk4goJz9fnrbNuMJ5Nwi3EajcG9yYLG+m4=; b=OuWHLknH1VwFodhjvYy5VTYy3Vbs2nnrXS3ezBmARNJH7cT0ConKXxAi197sYUs3I/ jl3FmtvQfQm4VjCFaDAPDf/BUs9x8yRj07fCETvats8fcizoYJKtA9fyUiqbDjqoYdCk 4sjCIidwK8Ni0sCCXjA8Aq65xr1zIIkpGD+/ChW/igHg21aZkZAsYw0BeFpIAGc3tcGs QO/syXu9+12oJ1V4ogVveyknhzZYa6RAPO1ix1YezyS+u1BLKYTkUDItDNqezPc63A5E pjp3rZRd0YAbmLrynLyXSp4qM1v5fr74QolxpA+IzpX7VgNXQv6nIc/33ONnr4ihdOsF hWmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o45vpIlb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si1902766ejr.172.2020.07.15.15.05.08; Wed, 15 Jul 2020 15:05:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o45vpIlb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727787AbgGOWD7 (ORCPT + 99 others); Wed, 15 Jul 2020 18:03:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727042AbgGOWD4 (ORCPT ); Wed, 15 Jul 2020 18:03:56 -0400 Received: from mail-vk1-xa42.google.com (mail-vk1-xa42.google.com [IPv6:2607:f8b0:4864:20::a42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C11D6C061755; Wed, 15 Jul 2020 15:03:55 -0700 (PDT) Received: by mail-vk1-xa42.google.com with SMTP id h190so846213vkh.6; Wed, 15 Jul 2020 15:03:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KI9Mde07pxk4goJz9fnrbNuMJ5Nwi3EajcG9yYLG+m4=; b=o45vpIlbigNauT/xzIHQ1p7d1Blxc0cUFIEu5F4vCfolJeRszhwNqo1DLkfIjSxMaB yrv7Wj8Jyp6ew+il2xDyqaB0hbB/opH/UCycK6qecxKpDN34G3YDxis5atxFLDOe2QVD CZ10+gSLvOmAlqnqlu0qHhQ9iyaHRz+M9zKGLQ84I3BfupbM9gr1slhno5rvZmyUcmUJ 5WviwD7Rzf6gyPHZVQBcjMChMTjrd59MIUTrkBbk1Y9R6LZyHr/Zabh4h3NYZJ49fR+3 7Xpelf2nXEC86SuOEBrCp2SFFrUY1BPBGU7T2+OHBLF7fpYly6emsos71DruFRQ4J8Ez AqWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KI9Mde07pxk4goJz9fnrbNuMJ5Nwi3EajcG9yYLG+m4=; b=E2wQhijmvt1oLLco2yGvc3T1fZ9/gI3nO6kJ3iT6MpE/sr0b0BUAuKRCa5W7Mx98kb I4BiF0XhtKZ8D8EJYisg7cTfZryT5xDy9X1tsgw9yeosXHxm99fYi+CjdzQlU21Q9ZCA skONYxfTRFJBMCfy10+lb6FKXfAhzvDPK7vHRyXGU43tXuAt1f6ZiMaJjkHN2OESipuL cIjNUp9gcAaTA/em4KRIIjBKzx9jDHk2E1qtpavVv9gFkTydHARAYrivLvO9PsuCTvhG C5EIUGSEv7ph2O3o8txujykf0PiM9Wyon0XY74t6SyVHs7IktkJ+0iUiDmcZBgkl7Tw2 qxAA== X-Gm-Message-State: AOAM530SvLNXvqpeKEGM7Dann0boEp1Tl0LFwRLfujiRHeZYPckj/HIJ 7HHcAyUWS8NFSrPFUBYcugaUaxwxCQHYDiSWdA4= X-Received: by 2002:a1f:eec8:: with SMTP id m191mr999635vkh.47.1594850634903; Wed, 15 Jul 2020 15:03:54 -0700 (PDT) MIME-Version: 1.0 References: <9324ef33-eedd-b965-37e8-b82e06778aab@0882a8b5-c6c3-11e9-b005-00805fc181fe> In-Reply-To: From: Ju Hyung Park Date: Thu, 16 Jul 2020 07:03:43 +0900 Message-ID: Subject: Re: [PATCH] ata: Disable queued TRIM for Samsung 860 SSDs To: "Martin K. Petersen" Cc: Simon Arlott , Jens Axboe , linux-ide@vger.kernel.org, open list , Tejun Heo Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, On Thu, Jul 16, 2020 at 5:53 AM Martin K. Petersen wrote: > I really wish we had some more data to work with :( > > Lacking a proper heuristic I guess we don't have any choice to disable > the feature. But that's sad news for the people who currently don't have > problems since their performance will inevitably suffer. It seems like the latest 860 EVO's firmware, RVT24B6Q, is fairly recent. The earliest reference that I could find on Google is this from Jan, 2020: https://smarthdd.com/database/Samsung-SSD-860-EVO-M.2-500GB/RVT24B6Q/ and an Amazon review. Earlier reports seem to be related to ASMedia's chipsets and NCQ quirks. AFAIK, no reports were made in 2018. IIRC the last time we went through this with the 850 series, a bunch of people reported data corruptions, sometimes even filesystem's superblock. Surely, we would have gotten reports of it pretty soon if the drives were indeed faulty. Maybe the latest firmware is to blame? Also, I don't think queued trim is all that crucial to performance imho, at least in the context of Linux. In my experience, regular R/W I/Os were still severely blocked when fstrim is undergoing even with queued trim was in use(which, to my understanding, is exactly what queued trim tried to resolve in the first place?). Probably file-system's implementation is at partial fault too with it sending ERASE commands with too big granularity. I believe f2fs' default discard_granularity of 4KB is what tries to mitigate this. Linux distros are not using the "discard" mount flag by default and defers to periodic fstrim on idle. Android has been doing this since 4.3(2013), and doesn't even use SATA. f2fs avoids this problem entirely by sending ERASE commands only when the drive is idle. All in all, I don't think we should pull out hairs trying to figure out how to do this properly. I'm yet to be convinced that queued trim solves practical performance issues. If we can't figure this out quickly, I agree on blacklisting 860s again. Thanks.