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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74EC5CA0EEB for ; Tue, 19 Aug 2025 18:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hIM8pxHDg7sHilnYSvNrSmQ0DIgwlxe71L9aRyWDXg0=; b=GO4B8+XE7vFvLmeK0GQMXUdeCU eABEkS4n4H7RFFK75IvVSV7n7fWbF9sZUsCEbZpr1y6R5qvCdqsMB9bl4KW1XS/6w5HeUQnH1eV5l rQNzEduZgfydNC0Bd6teHOfSXFrVigSerRegbCZHfcujRht8aO9+TDegpVbKNleoQVdAqMHrpv+Po 4Xd8aB8C3DXC+llEsuil+gtDtbEw+d85X3e2nlKI3V0kI02ftUBePGCZLCoWGBZ8i9sscp6YNh4vb Wkg+gJ/MvWnrJa1mpGzczlQBFfsuDEWFPyYi1Grb1pyLbSNXSJXo28cnb5UWLaX7PTvd1qX4/1pOu GK8/7I3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uoQsD-0000000BFnN-3pk6; Tue, 19 Aug 2025 18:15:53 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uoNZ0-0000000Amul-0UfK for linux-nvme@lists.infradead.org; Tue, 19 Aug 2025 14:43:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 1E29660209; Tue, 19 Aug 2025 14:43:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AD56C4CEF1; Tue, 19 Aug 2025 14:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755614628; bh=RkD04FQVIfKeJgPUl+3UuGZz11Eg8h6L0G2LPJcuVVE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=THPhSrsA3AiA6DI/j5UFDKpwA/dyDnJpVueaM0Tx0MNM5kzyW/nqRfIMVAtdnIuOb vPaqnDZolWS3cVMT55/M8rJfnSLiD9v+jiMCDlKjg8OrFC72reEi/p32Ud4AZbddyN 8ja5hffrsQunlVUAQ8vy8Mtb6NV7Mspcb1M+Jhx4ubLxK1kegO0lwO+tI1Kdg+/IFB oSRP7fGsGLEHBdsufk/qup3/xjfuJvFzJfr/0tuk8KCY/HzmJGw+VqQ4jhclPfBKf/ Xk2sGvECXYqMHWBx4jQd2lYQOAuZEW1vWbT11l3wCdyHfpapKKMf/BYqm+npwyZWRh JB77f2be2VbHA== Date: Tue, 19 Aug 2025 07:43:47 -0700 From: "Darrick J. Wong" To: John Garry Cc: Christoph Hellwig , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: Do we need an opt-in for file systems use of hw atomic writes? Message-ID: <20250819144347.GC7942@frogsfrogsfrogs> References: <20250714131713.GA8742@lst.de> <6c3e1c90-1d3d-4567-a392-85870226144f@oracle.com> <6babdebb-45d1-4f33-b8b5-6b1c4e381e35@oracle.com> <20250715060247.GC18349@lst.de> <072b174d-8efe-49d6-a7e3-c23481fdb3fc@oracle.com> <20250715090357.GA21818@lst.de> <20250819133932.GA16857@lst.de> <59a0d2df-a633-4f82-8b11-147ba88b7bcb@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59a0d2df-a633-4f82-8b11-147ba88b7bcb@oracle.com> X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On Tue, Aug 19, 2025 at 03:36:33PM +0100, John Garry wrote: > On 19/08/2025 14:39, Christoph Hellwig wrote: > > On Tue, Aug 19, 2025 at 12:42:01PM +0100, John Garry wrote: > > > nothing has been happening on this thread for a while. I figure that it is > > > because we have no good or obvious options. > > > > > > I think that it's better deal with the NVMe driver handling of AWUPF first, > > > as this applies to block fops as well. > > > > > > As for the suggestion to have an opt-in to use AWUPF, you wrote above that > > > users may not know when to enable this opt-in or not. > > > > > > It seems to me that we can give the option, but clearly label that it is > > > potentially dangerous. Hopefully the $RANDOMUSER with the $CHEAPO SSD will > > > be wise and steer clear. > > > > > > If we always ignore AWUPF, I fear that lots of sound NVMe implementations > > > will be excluded from HW atomics. > > > > I think ignoring AWUPF is a good idea, but I've also hard some folks > > not liking that. > > Disabling reading AWUPF would be the best way to know that for sure :) What is the likelihood of convincing the nvme standards folks to add a new command for write-untorn that doesn't just silently fail if you get the parameters wrong? > > The reason why I prefer a mount option is because we add that to fstab > > and the kernel command line easily. For block layer or driver options > > we'd either need a sysfs file which is always annoying to apply at boot > > time, (Yuck, mount options, look how poorly that went for dax= ;)) > Could system-udev auto enable for us via sysfs file or ioctl? Userspace controllable sysfs configuration knobs like discard_max_bytes and discard_max_hw_bytes work well with that model. The nvme layer can set atomic_write_bytes to zero by default, and a udev rule can change it up to atomic_write_max_hw_bytes. That's not /so/ bad if you can either get the udev rulefile merged into systemd, or dropped in via clod-init or something. --D > > or a module option which has the downside of applying to all > > devices. > > About the mount option, I suppose that it won't do much harm - it's just a > bit of extra work to configure. > > I just fear that admins will miss enabling it or not enable it out of doubt > and users won't see the benefit of HW atomics. > > >