Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp1996798lfo; Sat, 28 May 2022 13:09:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxohoXOieZik4AJBItVhdJll7IMDIYmjrZYzJeyQl9gyp18loR/n/2aE9gV7mYgwO1G0qeA X-Received: by 2002:aa7:90d5:0:b0:4e1:307c:d94a with SMTP id k21-20020aa790d5000000b004e1307cd94amr49892505pfk.38.1653768585973; Sat, 28 May 2022 13:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653768585; cv=none; d=google.com; s=arc-20160816; b=k1mGKSHKnPyHUESQF4de1xf4k3pukmOPoz+NYPB59P28Xr4i8ih823/R8/hJjXsL3b 4VkLLeFnCZQ5pP/hjcCgIZiCvq+LJpGOpSwK9NVphn5JO2Ap+SynYKq/bNIrt+73+bdN w2Qv/vf0+AI7HDzYYiRFbIkbhjkbOZ0LTv5hIVC4GuYIlyb5KuBkn+erxn63iOMJVI+w ZgQUTgMU4xDcaZcTidWi8BDw3V7IP7DW04ABYrqcJn9bhAro7DwAo/hY53BNm1qglRKl mvVCsuTN/bay5/N8xhTNymkagVfRwGWTKXKd3710JE+hE9taRlxr42yarUJPtFOMm9Tp e4bQ== 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:dkim-signature; bh=dPis73HBQo9a0FxL5Ft3buWdk1V5Ow4ivM0BihDVe1Y=; b=L2Y3Fad0Dcz9VLTR5hbsi7KArMgyKPH1lLZLFzUWCBWvnu7UCU8YFPYZJgKsa7YSpg EjcDMk3scz3Y+mwTQEhAQEY9BWNswGyP1zUZBKyol06AMSz1shJmAyrjmM1/nOQws3Y6 C2A9bsQhC2tXg8s11DiyyOu6wn239+tE0d+YKcpgBxohiOXD8VIZ0EqFs8tCbhJBYMBb hBvS7d9WqxTKZB0uQOHwdlyU05T2AkZhJnxc01ZINQriRiV8IbCybZeiIHNVpQemNXKf C2yTrH9v2xFELjUGzFNoj1eYRl7b22p2904tRcz7JDM5fAfC0slNWJ8r0KSe8Gpwlpmc 8raw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Z/baBl8w"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u16-20020a170902e5d000b00163868019a3si9910183plf.360.2022.05.28.13.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:09:45 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Z/baBl8w"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4EB051207CA; Sat, 28 May 2022 12:23:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355260AbiE1A0j (ORCPT + 99 others); Fri, 27 May 2022 20:26:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245666AbiE1A0i (ORCPT ); Fri, 27 May 2022 20:26:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C926F59D; Fri, 27 May 2022 17:26:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A09F9B82655; Sat, 28 May 2022 00:26:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DA5EC385A9; Sat, 28 May 2022 00:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653697594; bh=v97sikmwzDyAsEzqE9wN8Xw6wJ6O7aw4Guu8y1BBzCo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z/baBl8wZ6FycigoHdy9I/Xm92oP5Ku7LvlZtmd46lBpML5Mtk61WZwXDY3MDCrQM fn40TtaqoJeW3zwa31G20nWpx6lZWgbcIE9aUitvgoZOQmoNEVXqVo7S7AzaECVfeX 7Hh+a1YFDGrR+U2kYyfeR7ZURDo9DM3bM2ej77PmGjh+tYZhl2cWbmgH/xLN9QMLw4 pni/z9FcoJrZGC9N89MTQ3r+FrURKDIJiWP2Xxv2YsYSC67HhEEAVbuRaPCO1bdz9t qOh9/iRm7X2FpVu8n6vqb3vaaQMVtwdAt6ShaLq5HMywVsCeQFS816KZItagq4jLVU PmTcNMJHgWBLw== Date: Fri, 27 May 2022 17:26:32 -0700 From: Jaegeuk Kim To: Dave Chinner Cc: Eric Biggers , 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: References: <20220527205955.3251982-1-jaegeuk@kernel.org> <20220527235509.GW1098723@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220527235509.GW1098723@dread.disaster.area> X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 05/28, Dave Chinner wrote: > 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. I was thinking to turn off FUA in driver side quickly tho, one concern was the bandwidth vs. latency. What if the device can support FUA having short latency while giving low bandwidth? In that case, we still have a room to utilize FUA for small-sized writes such as filesystem metadata writes, but avoid DIO w/ FUA for sequential write stream. Is this just HW problem? Or, does SW need to use FUA more efficiently? > > 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