From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A91A32573E; Fri, 14 Nov 2025 15:36:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763134611; cv=none; b=Y1r3nHLouYxc7T9Vud0vfpQ44jCFkdGnIYxVWTIOFnoTw8az1DPs4N664UWIoeKCVkW08wCYCrT0IISTTmioUaHamrtdVLBUiXxotKTCIalDf3DFkBqyXwTsyEIwIdJ3p3u04Fs5SopxJYkCChnfGrp5jg2SqhZK5s8WWAG4Kxg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763134611; c=relaxed/simple; bh=puvLXh5u8I8NJkQFC3SxNEhEGzv/w9+sDClfLtptJ8M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qHViGaRnD8sByu8F7YijPjFYy6xUYpS2USDCbt/+rFlnSGxDAxzA8We1IfF0Xo8YWe8A8ewEMWPk4qeQJnfqTaX9QqHoCE/r9R2kPh6ywPD0EHnfiAnn43/GKf67T1V/S63eSjClZnTjDNKlvKWLwt8703pBzi/Jw4zaKa5ANNI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id A84A4227A88; Fri, 14 Nov 2025 16:36:44 +0100 (CET) Date: Fri, 14 Nov 2025 16:36:44 +0100 From: Christoph Hellwig To: Kevin Wolf Cc: Christoph Hellwig , Jan Kara , Keith Busch , Dave Chinner , Carlos Maiolino , Christian Brauner , "Martin K. Petersen" , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-raid@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: fall back from direct to buffered I/O when stable writes are required Message-ID: <20251114153644.GA31395@lst.de> References: <20251031130050.GA15719@lst.de> <20251031164701.GA27481@lst.de> <20251103122111.GA17600@lst.de> <20251114053943.GA26898@lst.de> <20251114120152.GA13689@lst.de> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Nov 14, 2025 at 01:31:20PM +0100, Kevin Wolf wrote: > My main point above was that RAID and (potentially passed through) PI > are independent of each other and I think that's still true with or > without multiple stability levels. > > If you don't have these levels, you just have to treat level 1 and 2 the > same, i.e. bounce all the time if the kernel needs the guarantee (which > is not for userspace PI, unless the same request needs the bounce buffer > for another reason in a different place like RAID). That might be less > optimal, but still correct and better than what happens today because at > least you don't bounce for level 0 any more. Agreed. > If there is something you can optimise by delegating the responsibility > to userspace in some cases - like you can prove that only the > application itself would be harmed by doing things wrong - then having > level 1 separate could certainly be interesting. In this case, I'd > consider adding an RWF_* flag for userspace to make the promise even > outside PI passthrough. But while potentially worthwhile, it feels like > this is a separate optimisation from what you tried to address here. Agreed as well. In fact I'm kinda lost what we're even arguing about :)