From mboxrd@z Thu Jan 1 00:00:00 1970 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.subspace.kernel.org (Postfix) with ESMTPS id B4D2D2E0410; Tue, 12 Aug 2025 07:59:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754985553; cv=none; b=X5KuAN5w4cMAwekuQd+MxhcwE0A321uU/L6skRB1juNq5VAdTp+5ovhxAEMaxWVVJ/Xss0ZCzb4eTzmjnwW05WFhMaUzvpxFVWvAP41Kf/XsMOAuRx3crOiut0Y0ZKqx9hyM8DuPEwkQ+Zw2sZmFMgoTSQNYf8i/jEFFXuwVXCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754985553; c=relaxed/simple; bh=S1PwdsId4eDIha95kORFrOwN42BU9NJ/foahGhV8L7E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qx5rP3bTKHOjkGyaVMBaTo8Zr9YZS1LuLXk27LRXM4mfN4uO2ZyKPePczmOzE2DyOXEUpbkpdXY2aQTXaj1KOpme97mfUwJgkY5QxfLMh9YlfTCXHQhJjqzwS/i7gXTHRIAX5mqpPKQ0bvgieR/AlLUTYUsPI+ijvVKlniX3kl4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=belUHZ5w; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="belUHZ5w" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Vd1f/4Sp7X7PECw8VCBF/HCYX3GWhKDPDeSyyBxNL0o=; b=belUHZ5wnvzwGG+QVZgWBECz07 H+yQPI+U+xjeTV4rMC6T/tolOAGXgux1DhEgBcB8qF2ZPrCrWxRM+nX4Ink/cdL5uCFnG+u9ogJU5 n6GwC6PT4UmbFBkf66HmSAQT4tXZUPDZ4jKw+FbBZCG4B1Uf/zlHySxvq3UogpBeRJ/bCKaojpkrt ghwOMEGWoPj+iymXYuf+BHktP8CVDfV5UykJJACstqvhec+DAeuSoxrZTPP5EeoKvgr6O+m8s3g4y oQvuFUY52hwL5uQ1r/eehnN5SdMPalKRqjegYNxaccEx2rA9QRh20c2wAoIEV6GSVSnNzS6J9jLeN en+D4YxQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uljuY-0000000AAuT-1FIF; Tue, 12 Aug 2025 07:59:10 +0000 Date: Tue, 12 Aug 2025 00:59:10 -0700 From: Christoph Hellwig To: Chao Yu Cc: Christoph Hellwig , jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [PATCH v3] f2fs: introduce flush_policy sysfs entry Message-ID: References: <20250807034838.3829794-1-chao@kernel.org> Precedence: bulk X-Mailing-List: linux-block@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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Tue, Aug 12, 2025 at 03:53:54PM +0800, Chao Yu wrote: > > What did you use before? At least for older qemu the default was > > buffered I/O, which can lead to very expensive fua or flush calls. > > Previously, I didn't use any cache= option, as manual described, it > should equal to cache=wrteback. Modern qemu actually split the cache option. You absolute want cache.direct=on. If you don't do simulated power fail testing by killing qemu (or run real workloads for the matter, but who does that :)) it might make sense to just ignore the flushes with cache.no-flush=on as well, which is what I do for my test VMs on the laptop. 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 1F6F6C87FCB for ; Tue, 12 Aug 2025 07:59:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:In-Reply-To:MIME-Version:References:Message-ID:To:From:Date:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CvpNcvVyqhagw9lw0vgOvJao/WqMFiAudVF339aEOh0=; b=k3DYWJd5XIx1IWI4RVB//MPwF6 0uF1B0+Q59t293tfNkkIx33pJ2LybyuetrjRy/+eHVgplTQlrzrYEqtdZsS2RIGpr+zmAkXnGAw+q O9CyYmQM+WsmORWvAQBvrPCLgfvKknFNTwbRabvKPM7L2Ugjnc6pth/r7TQYDBS/aL7E=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1uljuk-0001jT-Js; Tue, 12 Aug 2025 07:59:22 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uljuj-0001jM-Ll for linux-f2fs-devel@lists.sourceforge.net; Tue, 12 Aug 2025 07:59:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Vd1f/4Sp7X7PECw8VCBF/HCYX3GWhKDPDeSyyBxNL0o=; b=J9fMlyYnsV8j/Wqrd0ffgl3qYS JFx1zyx6I8jNvOwstTD/kfjLnkSmcj3CuEVBhIQh8IxJKbdH9GBa2hzrezhU0t8TVCpAiS511hEwt 1BDtMbaH7XWspWwSqs9jAi8sfx9zvrIGZSjh4bv95mLd3J9Kx/8sXi/HED6wLR83NdGU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Vd1f/4Sp7X7PECw8VCBF/HCYX3GWhKDPDeSyyBxNL0o=; b=GnHcoWeDqnJ3/2x1VhZG/eTEKW tXLRg0bS2N11/2SC3bWEs7mz4c7C04+cNP11ibgbNfXGXgQtfUA7iUsXJE5Hria84jV5fIeeW8E/3 a0JU94WvAdQ3v1rf02Xxy78N27nGCSkp7FF6iQUl8dmJYivKnPAWSsdQk0pYSXerX+uk=; Received: from bombadil.infradead.org ([198.137.202.133]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uljui-00042F-GN for linux-f2fs-devel@lists.sourceforge.net; Tue, 12 Aug 2025 07:59:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Vd1f/4Sp7X7PECw8VCBF/HCYX3GWhKDPDeSyyBxNL0o=; b=belUHZ5wnvzwGG+QVZgWBECz07 H+yQPI+U+xjeTV4rMC6T/tolOAGXgux1DhEgBcB8qF2ZPrCrWxRM+nX4Ink/cdL5uCFnG+u9ogJU5 n6GwC6PT4UmbFBkf66HmSAQT4tXZUPDZ4jKw+FbBZCG4B1Uf/zlHySxvq3UogpBeRJ/bCKaojpkrt ghwOMEGWoPj+iymXYuf+BHktP8CVDfV5UykJJACstqvhec+DAeuSoxrZTPP5EeoKvgr6O+m8s3g4y oQvuFUY52hwL5uQ1r/eehnN5SdMPalKRqjegYNxaccEx2rA9QRh20c2wAoIEV6GSVSnNzS6J9jLeN en+D4YxQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uljuY-0000000AAuT-1FIF; Tue, 12 Aug 2025 07:59:10 +0000 Date: Tue, 12 Aug 2025 00:59:10 -0700 From: Christoph Hellwig To: Chao Yu Message-ID: References: <20250807034838.3829794-1-chao@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Headers-End: 1uljui-00042F-GN Subject: Re: [f2fs-dev] [PATCH v3] f2fs: introduce flush_policy sysfs entry X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christoph Hellwig , jaegeuk@kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Tue, Aug 12, 2025 at 03:53:54PM +0800, Chao Yu wrote: > > What did you use before? At least for older qemu the default was > > buffered I/O, which can lead to very expensive fua or flush calls. > > Previously, I didn't use any cache= option, as manual described, it > should equal to cache=wrteback. Modern qemu actually split the cache option. You absolute want cache.direct=on. If you don't do simulated power fail testing by killing qemu (or run real workloads for the matter, but who does that :)) it might make sense to just ignore the flushes with cache.no-flush=on as well, which is what I do for my test VMs on the laptop. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel