Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2407077ioo; Sat, 28 May 2022 12:38:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9p+n6/pC9cmvpZkSiYO0LmTXtrF/btg8cQFl1H54PB4Po3aX5ErGecY/egdtHbuhpWBny X-Received: by 2002:a17:902:ce91:b0:163:75a3:8e85 with SMTP id f17-20020a170902ce9100b0016375a38e85mr14393746plg.125.1653766693218; Sat, 28 May 2022 12:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653766693; cv=none; d=google.com; s=arc-20160816; b=BFJkYFCMa6ZqvgNNgBI1rovns/ZS/BpUHMmfXHCnTD31+Ijy3YBeVNrZSpXgXqHdbY 2cji4j7UbFgc+urmCeFrIU3DSAeKB9WmjG11tSC7FCkXMZBLdK1ebdo27RHOGlFTmTiO OFI41V2Pyxk76eXljx6a1lD9Bfsm9cGFiICv4/lUlzsoGhGt29JO24ctp9zGNhrZ+P6/ gVATCC7uFv6LDrzNQ+FAKqxmdX0mFfewMXtwPnOowiYhL/UMTVFZxiUKl0bcJP8hMMZN h09zV5ZNMFslPANNPnmd6LatLkX4lrBtN3GbYVrcSZG5JIHxeRoH5cpG5P5FesUsj4PZ Tytw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=sGgkSMjY/pNDIVp/2hPYu28vjSE1+bH/Ysf16SyaKys=; b=Is4yUEWIy7S4xckSBsNZpicmndO659sOOTFuQicTNZ08T0DHQ/y6FRm2s/vd0dJkho avtMJqrfVV2JBfiQmIN19Dzp8hnt0dWV1gYlkd/OSWOPpbUPZfud4DmunD2t05rmaTAl nhYYNMmWV3hBBfWYzLe6UjfZEd3sAMzdkbpAZGs+YXxy/qShT1H6O7gzBPbs3Y+T1v/a P5FjqSoCBEO+CYPKQ/xXPyLaRsWDyPXGCW6Fl5csllplh3f1gB73LfSO+O5g9krVk1h8 eHfNlb60/bTCBw4/LgsAvuvr94iKonQDsuyHQbbMH224gR7ioqnhyigcac/Gj0qtrAE6 Ma+w== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x15-20020a170902ec8f00b001582df39d27si11158596plg.175.2022.05.28.12.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 12:38:13 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1EEAE5D185; Sat, 28 May 2022 12:03:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355201AbiE0XzN (ORCPT + 99 others); Fri, 27 May 2022 19:55:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244378AbiE0XzM (ORCPT ); Fri, 27 May 2022 19:55:12 -0400 Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95E5B66AD2; Fri, 27 May 2022 16:55:11 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id CE065538A2A; Sat, 28 May 2022 09:55:10 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1nujnR-00HD7K-5X; Sat, 28 May 2022 09:55:09 +1000 Date: Sat, 28 May 2022 09:55:09 +1000 From: Dave Chinner To: Eric Biggers Cc: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH] f2fs: add sysfs entry to avoid FUA Message-ID: <20220527235509.GW1098723@dread.disaster.area> References: <20220527205955.3251982-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=629164de a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=kj9zAlcOel0A:10 a=oZkIemNP1mAA:10 a=VwQbUJbxAAAA:8 a=7-415B0cAAAA:8 a=SVjUjkoNg4n66X4JJ_kA:9 a=CjuIK1q_8ugA:10 a=AjGcO6oz07-iQ99wixmX:22 a=biEYGPWJfzWAr4FL6Ov7:22 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, May 27, 2022 at 09:33:55PM +0000, Eric Biggers wrote: > [+Cc linux-block for FUA, and linux-xfs for iomap] linux-fsdevel should really be used for iomap stuff... > > On Fri, May 27, 2022 at 01:59:55PM -0700, Jaegeuk Kim wrote: > > Some UFS storage gives slower performance on FUA than write+cache_flush. > > Let's give a way to manage it. > > > > Signed-off-by: Jaegeuk Kim > > Should the driver even be saying that it has FUA support in this case? If the > driver didn't claim FUA support, that would also solve this problem. Agreed, this is a hardware problem that need to addressed with a driver quirk to stop it advertising FUA support. The high level fs/iomap code should always issue FUA writes where possible and the lower layers tell the block layer whether to issue the FUA as a FUA or write+cache flush pair. And, quite frankly, exposing this sort of "hardware needs help" knob as a sysfs variable is exactly the sort of thing we should never do. Users have no idea how to tune stuff like this correctly (even if they knew it existed!), yet we know exactly what hardware has this problem and the kernel already has mechanisms that would allow it to just Do The Right Thing. IOWs, we can fix this without the user even having to know that they have garbage hardware that needs special help.... Cheers, Dave. -- Dave Chinner david@fromorbit.com