From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 85DA21B0437; Tue, 12 Aug 2025 08:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754986969; cv=none; b=YN9h2LGVJzDUY9DJ1hhm+DcziNwkQ89nBDqdODTRhxfQyQc1RCA5MdgDYbZLcNTqhoFtmg9Dgsn8hklngHNKxFTvoc5MMfko8aPIpcmUdaNLtrDC2Vsn8Q5sAQ3EDvOfv0p8wGEyra9mUj8GmJrI9a+Spm2504H4hSrWZFxdOxU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754986969; c=relaxed/simple; bh=SOEUCvkrPLt2cHYTej/oN0PrHTSMKACUoX3UK91QOnc=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=kuCIpx0No9hITnMQwsi7lGAvi70TTDCnW1mY5kuFC/qVLGFkjLHmW3r+upERxR6UmsdEBKLKdNCV2b/bNCHardTuQzCj89DsHsVWpsh9bZyJtcJ6QVxndSRSSfIYXFUB5LvCtWm7KBf1+ky+IiJo2bEVCmaPSFkGfXyezURud0Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DmuKztNS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DmuKztNS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61B7BC4CEF0; Tue, 12 Aug 2025 08:22:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754986969; bh=SOEUCvkrPLt2cHYTej/oN0PrHTSMKACUoX3UK91QOnc=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=DmuKztNSYXOf9162p+KgvmQJqJ7Lo2pii4ZU6f4YPV/QG3AgElpCsFbknaVQXDrgi jBXA/1r1k2vKNTTYj4RyHwDBMLN/FV68Xzr5p13a7pZtXFhvnJeYMhrSNPKJE3Vzyv DoxyxCPRfXoOIvpwrsjrHdytr2EFvVz07mqFe+K6FwvIadT5wxHkSnaPs9u4Cuc2GE 6mOcqTi4++iVqHu/KeNhZN3hOjqDdHIlle/vy8d+dbGc0+2YMpYGbJOVcECjAhFGg+ +P0C6dNHxCaP7gQu4C8VNM8Z2Z3U6pwurWGjnZUKTwguhA6pimV0t3vPVfrd17CzAj 5i2xWUqPfA1Eg== Message-ID: <16753b65-326d-48ba-90d2-476380455199@kernel.org> Date: Tue, 12 Aug 2025 16:22:45 +0800 Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, 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 To: Christoph Hellwig References: <20250807034838.3829794-1-chao@kernel.org> Content-Language: en-US From: Chao Yu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/12/25 15:59, Christoph Hellwig wrote: > 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 Yes, > 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 Yes, I don't care whether data can be persisted to host devices or not, nor killing qemu for test, so cache.no-flush=on looks good to me as well. > as well, which is what I do for my test VMs on the laptop. Thanks for sharing this, it helps. :) Thanks, 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 938DECA0EC4 for ; Tue, 12 Aug 2025 08:23:05 +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: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:References:To:MIME-Version:Date: Message-ID:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dEa0U0gIv8u6/vjMFLu24VZ0hBfs72xjkpbLcJHNEO8=; b=c09qAyjG0B94oCaJ9sWFvWWnDg lcv4sLcaVXS+nqSfK7hwzdzzThyTKzYhKFsGIZoKzM++y6kv7rn/XMoeiozOb2Hb7YMYVCuY+MqOj 7OgyzQRgCH/ZkRhMOgNAWsey4Un2BuvWIbPKGVcDAeJ1WgmFQyY4nBXQUJchs1TQHxnc=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1ulkHg-0000zy-D7; Tue, 12 Aug 2025 08:23:04 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ulkHc-0000yH-Ek for linux-f2fs-devel@lists.sourceforge.net; Tue, 12 Aug 2025 08:23:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:To:Subject:Cc:MIME-Version:Date:Message-ID:Sender:Reply-To: 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=PEzC0JsOQgHTRn1udthgMhTBu1dJKJ1JYWatB9X+5c0=; b=VxOlS15OcoBZSPHAaXOTtPrzbr uB2sdZZ8aweiaBl2s41A5cJ/edmFWQ0pEth0Z45UpI1KJkU7UwllzZ+Ce45zoIdPJkbe3yawUWbbk HnZ4zC7mlqPMB3bMt2b0bCU+xM9vhD21CupVTt/CZWkeVXAbVZn2Gm28Gopebu9cy0VE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To: Subject:Cc:MIME-Version:Date:Message-ID:Sender:Reply-To: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=PEzC0JsOQgHTRn1udthgMhTBu1dJKJ1JYWatB9X+5c0=; b=RfpfVRYpYkNeC6QJXWSlV1ng/R ppdhWycDKEZjt3eB3O/n+oSoxIVsITiIVT3UUhOom3/yuO5QazESrU0WKNuz7J4qqgmdhvqNvhm6w 2zUgBRfSejIckj2wMkIiqdTANOXuwDuWZVJxF4sB7Z7K8BoEWCn4uji18tFkzzKAVTHs=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1ulkHc-0006fP-2Q for linux-f2fs-devel@lists.sourceforge.net; Tue, 12 Aug 2025 08:23:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 5F17B60206; Tue, 12 Aug 2025 08:22:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61B7BC4CEF0; Tue, 12 Aug 2025 08:22:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754986969; bh=SOEUCvkrPLt2cHYTej/oN0PrHTSMKACUoX3UK91QOnc=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=DmuKztNSYXOf9162p+KgvmQJqJ7Lo2pii4ZU6f4YPV/QG3AgElpCsFbknaVQXDrgi jBXA/1r1k2vKNTTYj4RyHwDBMLN/FV68Xzr5p13a7pZtXFhvnJeYMhrSNPKJE3Vzyv DoxyxCPRfXoOIvpwrsjrHdytr2EFvVz07mqFe+K6FwvIadT5wxHkSnaPs9u4Cuc2GE 6mOcqTi4++iVqHu/KeNhZN3hOjqDdHIlle/vy8d+dbGc0+2YMpYGbJOVcECjAhFGg+ +P0C6dNHxCaP7gQu4C8VNM8Z2Z3U6pwurWGjnZUKTwguhA6pimV0t3vPVfrd17CzAj 5i2xWUqPfA1Eg== Message-ID: <16753b65-326d-48ba-90d2-476380455199@kernel.org> Date: Tue, 12 Aug 2025 16:22:45 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Christoph Hellwig References: <20250807034838.3829794-1-chao@kernel.org> Content-Language: en-US In-Reply-To: X-Headers-End: 1ulkHc-0006fP-2Q 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: , From: Chao Yu via Linux-f2fs-devel Reply-To: Chao Yu Cc: linux-block@vger.kernel.org, jaegeuk@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 8/12/25 15:59, Christoph Hellwig wrote: > 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 Yes, > 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 Yes, I don't care whether data can be persisted to host devices or not, nor killing qemu for test, so cache.no-flush=on looks good to me as well. > as well, which is what I do for my test VMs on the laptop. Thanks for sharing this, it helps. :) Thanks, _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel