Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp904854rwb; Thu, 6 Oct 2022 06:09:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4CDz9Xt6uyyBuu2QIznLPnV2W8QOrsqo1gefCF4O/Qt98zTfcHuXjsEzw/kMtxnOXZjJXE X-Received: by 2002:a17:90a:582:b0:20a:97f6:f52e with SMTP id i2-20020a17090a058200b0020a97f6f52emr5183121pji.126.1665061753519; Thu, 06 Oct 2022 06:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665061753; cv=none; d=google.com; s=arc-20160816; b=rfKT/SBEmGXHQFtwK5fos2OTihHHOn+bC6kRZAyQtuZzM6yzHt6tC7X669qQkkroYY oQ5ZcT9/O/gKsk9tpwpaW/ONmKUFw/ohCnS07JjIh/n8WfSU8OcGx7LWPAxsrWj4NM5D uqrMBgcJJLpUSX3ZS6fwtKfCik9MqNqQPq8PuHG4FRRGqFiww96urdEE+pqjiHiNOin1 1DMY8YeUJODqvAtfx4r+e1hPF0hkGtvHF3+Gsy5WJ/7LGIoYPBRlCEEioOsJJ3i3tt6k zfVPDKyp0A0y3tNDntoF0JhrTYPS1xoRGJt1P6zN6wWMDR+b/U6wSHpIp19oK9YOE1MP 1Yeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id; bh=7gYM11lLjCsJmuacr495u12ECtJ5AWE/YSyLnj7SXxI=; b=R9uibiTvATDVsqTX3HkVLneBVeTf+RYVer+nlaF+yclz1xAeEnaga8LKE28zmmGuP8 JS5a+Xr22wkV/cTiKqYbXslQnzb7pjH/V+gZgQEVg5G+EQq7vyr2fScAD8riLQqqsV7A sDxqgS70PJ/0gpQ/A5IOvPD3Q6M80jUwMKgVqIBKDkAavEP+raZ/rV/Zj6tyDdCerMlF AV02in8zlLAFkERrScDv26hOddft7ATot14uIgAOILXxdF5Y5dnT8DBnq3xFMtGIg/08 +dnnLjjRkulVYcepvZMuqSvw5AZMWbWiO7+cxhLlr6CFIIF4CSG45EpmKawzqQgGW/k3 nwpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a170902b70200b0017828d3c263si17781803pls.192.2022.10.06.06.08.59; Thu, 06 Oct 2022 06:09:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbiJFNGs (ORCPT + 99 others); Thu, 6 Oct 2022 09:06:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbiJFNGo (ORCPT ); Thu, 6 Oct 2022 09:06:44 -0400 Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97C53A5732; Thu, 6 Oct 2022 06:06:38 -0700 (PDT) Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ogQaA-0003JS-Sk; Thu, 06 Oct 2022 15:06:34 +0200 Message-ID: <7ecf20b7-794a-39d8-0b03-8f19d9167efd@maciej.szmigiero.name> Date: Thu, 6 Oct 2022 15:06:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Content-Language: en-US, pl-PL To: Damien Le Moal Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org References: <24a48f71-8a79-6311-1e43-494df0458a32@opensource.wdc.com> From: "Maciej S. Szmigiero" Subject: Re: [PATCH 2/2] ata: allow enabling FUA support in Kconfig In-Reply-To: <24a48f71-8a79-6311-1e43-494df0458a32@opensource.wdc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6.10.2022 01:38, Damien Le Moal wrote: > On 9/27/22 04:51, Maciej S. Szmigiero wrote: >> From: "Maciej S. Szmigiero" >> >> Currently, if one wants to make use of FUA support in libata it is >> necessary to provide an explicit kernel command line parameter in order to >> enable it (for drives that report such support). >> >> In terms of Git archaeology: FUA support was enabled by default in early >> libata versions but was disabled soon after. >> Since then there were a few attempts to enable this support by default: >> [1] (for NCQ drives only), [2] (for all drives). >> However, the second change had to be reverted after a report came of >> an incompatibility with the HDD in 2011 Mac Mini. >> >> Enabling FUA avoids having to emulate it by issuing an extra drive cache >> flush for every request that have this flag set. >> Since FUA support is required by the ATA/ATAPI spec for any drive that >> supports LBA48 and so these days should be pretty widespread let's provide >> an ability to enable it by default in Kconfig. > > This can be done by adding "libata.fua=1" to the CONFIG_CMDLINE option. So > I do not see the need to add yet another config option. A specific Kconfig option is more structured than a free-form CONFIG_CMDLINE (which is also technically a per-arch option, but seems to be widely supported across arches). That's why there is a lot (100+) of similar Kconfig default-changing options, a quick sample of these (in no particular order): SOUND_OSS_CORE_PRECLAIM, SND_INTEL_BYT_PREFER_SOF, LSM, SECURITY_SELINUX_CHECKREQPROT_VALUE, SECURITY_LOADPIN_ENFORCE, SECURITY_APPARMOR_DEBUG_MESSAGES, IP_VS_TAB_BITS, IP_SET_MAX, MAC80211_HAS_RC, SLUB_DEBUG_ON, KFENCE_SAMPLE_INTERVAL, PRINTK_TIME, DEBUG_OBJECTS_ENABLE_DEFAULT, RCU_NOCB_CPU_DEFAULT_ALL, ... libata currently has only one similar option: SATA_MOBILE_LPM_POLICY, so it's not like a person performing kernel configuration is overloaded with questions here. But at the same time, I respect your decision as a maintainer of this code. > > Patch 1 looks good. I will queue it up once rc1 is out. Thanks, Maciej