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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FEB0CD4F54 for ; Sun, 31 May 2026 00:12:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E20FC6B00CB; Sat, 30 May 2026 20:12:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DD1D76B00CC; Sat, 30 May 2026 20:12:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0DA76B00CD; Sat, 30 May 2026 20:12:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C25196B00CB for ; Sat, 30 May 2026 20:12:12 -0400 (EDT) Received: from smtpin03.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 5EB2E161B86 for ; Sun, 31 May 2026 00:12:12 +0000 (UTC) X-FDA: 84825787704.03.61B29FB Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf04.hostedemail.com (Postfix) with ESMTP id C630A4000B for ; Sun, 31 May 2026 00:12:10 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=fHOhsAuR; spf=pass (imf04.hostedemail.com: domain of jaegeuk@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=jaegeuk@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1780186330; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OYvRVj4ATb1VjPqyrKnbeBCWG0iaq3Bc8et+a/muwak=; b=fCEQuyNadwsh/K0eGIgT3aoV+6toX/uwHFbp5E3wm1BZOADVuqwUV/e7IJeto+I/TC7VD4 UqSjlxcoLzUjYQXdBQ6UN5vKgRP0BDH0UyV2VYELhzu4zGsh3MwhA+6SLIPeK90RgaQqDt /odzjCU19P/RaIU+Qo9ajbZBjkuWtX0= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=fHOhsAuR; spf=pass (imf04.hostedemail.com: domain of jaegeuk@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=jaegeuk@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1780186330; a=rsa-sha256; cv=none; b=thi6yPS+iCNhPWK/UJX/BYvs6ufSFiH6O116VFa5Re+a/gyycZXtYDTFy0u+OMBFwShB/E 80W7Kg4jBFhVnhrs2rjPDhycKZy4tK6Nqf30HC72XYJW07RF+NJmkm+G9e7c9jMKMNVvi+ oGQVggcWJ+2JbhLYvKBigBSvW0jO3xU= Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 0FFDB6001A; Sun, 31 May 2026 00:12:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57C321F00893; Sun, 31 May 2026 00:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780186329; bh=OYvRVj4ATb1VjPqyrKnbeBCWG0iaq3Bc8et+a/muwak=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fHOhsAuR4ScpU7RKty78SP/q0nx98PvpFWPIMukzAHEP+/dxNLJI95BYxZOkZRH8b 0vvtGETBPj6snAsl5sZla2ANtjpOu4hsZ5T9xZfqKEMyFTJ+hOr94AJt2anvzGK+2I UUkR+VjHrS2bRTK7MRYAYRcbwjVawM7kdJGKgjfyVuHrHvzAsPTa4LYjInu5Z7qURl uNsap2grrmNTO60WkFlgwkIZCj4q1gkDfjY+QhvWLXJjz4UkmrfX7fYLTkcA4ucLZJ K8wxewMF4nOOu52EePN9R+PXM0YUBOJ2WgVAEF3VTJ1jlevVgFJhgTDaF6fDHUvvrK pcE0/tyMGqKtg== Date: Sun, 31 May 2026 00:12:07 +0000 From: Jaegeuk Kim To: Christoph Hellwig Cc: Bart Van Assche , Theodore Tso , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org, Akilesh Kailash , linux-fsdevel@vger.kernel.org, Christian Brauner Subject: Re: [f2fs-dev] [PATCH v2] f2fs: another way to set large folio by remembering inode number Message-ID: References: <20260522141115.GA8258@macsyma-wired.lan> <20260522224108.GA18663@macsyma-wired.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: ijqb9ekimyqhyu9xzip86cz8bbp11czq X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: C630A4000B X-HE-Tag: 1780186330-582224 X-HE-Meta: U2FsdGVkX19cb9smYEOB6xXDc3x2mAhrZlG7o2OnaPYSRzYOKiSUxIyXMLDSEWAAyvQZeWb4yz7InDRipooXXcAHNK/i3/z3lzZv/5uzwVdN81cEGxU6pVpT+X2zhmdAGTQErDQGPhqNiQOy2bDCTGYyCrqd3clq1RyLOihfARR54ivAUINqoyueStX3set81/XKn6p75DqjZTJIOStJKsZFecTrA4bJwKs2/Z5EqMw4gF1EmX3RcKqpel8DwiYyENqH3x4XI2opBkRhUwMeUqAsJqEtpQrhuTqbAdrfCmGs0h7z/1mE/1DtH/mhwOGrSSU3+mih6dPQ0xI1gKThw2x4x1reqf4Dy+lXlSyrCr3o//ULmgrqyxFSnjs5QeqtlMO4HMHzRvWcE7cRpWh0RduoRNqlDKIxxPil37sSzrWgNQFgw7boSdo8X9y+nAN3ZZbrXJMIv3FrAHU1LIRjHD2HMJBDWgp0e4eSx+nuQ1hTnvquEu7NPjiM4Hug3d8nmg433lznLsvk1CtbTyJMtdMgY6ME/xsNvGHybWOuGmJg5JYTC/TYT12RM1Hbq6b9tVZezyB3P1TToutG1l5E78FPI/AOGrxfMe/wJq9ZuzJlZuGqN6yuDSGHeniJ3FbbPLXyUTBNYeYUcSD5/lnLozzL38t3ZHmQhI8o/AN89jbTwv4WYqzBMoXyMGfmkFMMcPrvGtnwmB6SBU+UrhLZXdby+ZtWQsjfn/An8+IwMmihtb284pRRpifvX9/2vluj5Qb8K2tian/OAAV+3Bv2vYxljXSRiMxbau6SKsqy8lTG7TMxurHwd9Wt+Pkf4seLScB4GWkKNliieVbYvbugl/KBx7Z6a03e23fry2aotWO28BTxwKn2NVMn2i6dHfhB1FS/C5CbaI1WQiAmDQfUio/VRnTcZfGjmnWmP/bILb7Flul+43z8NSNPeVCMplNBXTjm+XY0QaImNb+Qm2P k6DGcCwv qv4Xa3Kkgykl/bnqvfJ25LCgxhWuFO55CqPcWAYVG2Vwb9d2+f+bE3NMepIRyZ00mllD1xpaEbpoNFLqaZHtNPa3vfmAT8LJ1pnyL0YPAB2JTsIP7z05CtrIP2SPEiCKEEoGerR23c6z8RaR6FcshkK1pRDFNS5KMZdQ7QoxkaiZOuELFmjwX0yRi2AZBn7G38Q47v5JaXF6WOLGWKzHhKNn2TgbupSEMh5Q5g4PobVJ1DyQ4CWP7Uhcb40uTCdkNeMWfMYsHpsQ4GmyjRS0OLDY/cQFGMLa5Bmji Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 05/28, Christoph Hellwig wrote: > On Wed, May 27, 2026 at 03:59:35PM +0000, Jaegeuk Kim wrote: > > F2FS merges bios before submit_bio, regardless of small or large folios, > > since the block addresses are consecutive. So, I think IO subsystem was > > working in full speed. > > As does every other remotely modern file system. But that merging is > surprisingly expensive, which is why using folios gets really major > performance improvements. > > For one doing these checks to merge touch quite a few cache lines. > Second, devices are often a lot more efficient if they see fewer SGL > entries. I.e. having a 1MB bio a single SGL tends to work better than > having 256 of them. > The same is true in the kernel code itself, both in the submission path > (dma mapping and co), and even more so in the page cache handling > both before submitting and in the completion path. > > See Bart's patch about how long the walk of the bio_vecs in the f2fs > completion path can take. We had similar issues in XFS even in the > workqueue completion path due to lack of rescheduling, and these simply > go away when you do the folio manipulation in larger chunks (LAZY_PREEMPT > would avoid the need to explicit rescheduling these days, but that just > papers over the symptoms in this case). > I see. That's also super helpful. Let me kick off the large folio support asap. 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 D0217CD6E4C for ; Sun, 31 May 2026 00:12:26 +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:MIME-Version:References: Message-ID:To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YmzNjlN3NEw6gn5b/rArppdMSxlD29ufp9dsFDu4CQQ=; b=L9vYf8eek6znHW0XusXFAls3Ph cNunJTs0oiJBRd4+T3m17EcEnr49TVNM+JJyenFrVcchXemkkWhBFwOplaDSXrIA7T/uqUy/XdrrJ lYBXSmMN7S/MRR6k1jwEps6Kc6wut60AGCWta43bXagn8GEYayADYVjMYy8vRsj1SfK0=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wTTmw-0002Jm-Lu; Sun, 31 May 2026 00:12:22 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wTTmv-0002Jg-8O for linux-f2fs-devel@lists.sourceforge.net; Sun, 31 May 2026 00:12: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=OYvRVj4ATb1VjPqyrKnbeBCWG0iaq3Bc8et+a/muwak=; b=TMKki/0qrLSRxPth9U6mdfIrwZ PxZPLzMG50cixZTNvBjqwRrorAp0ZUqiVbqTeY2HGS/1kLciCzUr03oC//WGxXPYDVo+EWx2pBahd 3mUt9rE9COb5YQ1U8D38Q95yasqV6QFb5bgttpvXA2L8duXZZat8LsnXqYZ2POTzZpKE=; 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=OYvRVj4ATb1VjPqyrKnbeBCWG0iaq3Bc8et+a/muwak=; b=OIm2xLNMvZVR+OJaL1X4jUuIyV hsMARmS+GrebxIVupdu6LyVxbMOOIxwIiyDqGMIkS2pSRQIROBQKyHKaUQB4dk9afVYIk99LGDhiP LgT4uDq3y5/nJ8k9WJiZkO3WiHdfIx2zSxwF21mNl1zvOlNkh4BaSUE3YD/Tcmj8q008=; 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 1wTTmu-000688-A4 for linux-f2fs-devel@lists.sourceforge.net; Sun, 31 May 2026 00:12:21 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 0FFDB6001A; Sun, 31 May 2026 00:12:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57C321F00893; Sun, 31 May 2026 00:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780186329; bh=OYvRVj4ATb1VjPqyrKnbeBCWG0iaq3Bc8et+a/muwak=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fHOhsAuR4ScpU7RKty78SP/q0nx98PvpFWPIMukzAHEP+/dxNLJI95BYxZOkZRH8b 0vvtGETBPj6snAsl5sZla2ANtjpOu4hsZ5T9xZfqKEMyFTJ+hOr94AJt2anvzGK+2I UUkR+VjHrS2bRTK7MRYAYRcbwjVawM7kdJGKgjfyVuHrHvzAsPTa4LYjInu5Z7qURl uNsap2grrmNTO60WkFlgwkIZCj4q1gkDfjY+QhvWLXJjz4UkmrfX7fYLTkcA4ucLZJ K8wxewMF4nOOu52EePN9R+PXM0YUBOJ2WgVAEF3VTJ1jlevVgFJhgTDaF6fDHUvvrK pcE0/tyMGqKtg== Date: Sun, 31 May 2026 00:12:07 +0000 To: Christoph Hellwig Message-ID: References: <20260522141115.GA8258@macsyma-wired.lan> <20260522224108.GA18663@macsyma-wired.lan> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1wTTmu-000688-A4 Subject: Re: [f2fs-dev] [PATCH v2] f2fs: another way to set large folio by remembering inode number 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: Jaegeuk Kim via Linux-f2fs-devel Reply-To: Jaegeuk Kim Cc: Theodore Tso , Bart Van Assche , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Akilesh Kailash , Christian Brauner Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 05/28, Christoph Hellwig wrote: > On Wed, May 27, 2026 at 03:59:35PM +0000, Jaegeuk Kim wrote: > > F2FS merges bios before submit_bio, regardless of small or large folios, > > since the block addresses are consecutive. So, I think IO subsystem was > > working in full speed. > > As does every other remotely modern file system. But that merging is > surprisingly expensive, which is why using folios gets really major > performance improvements. > > For one doing these checks to merge touch quite a few cache lines. > Second, devices are often a lot more efficient if they see fewer SGL > entries. I.e. having a 1MB bio a single SGL tends to work better than > having 256 of them. > The same is true in the kernel code itself, both in the submission path > (dma mapping and co), and even more so in the page cache handling > both before submitting and in the completion path. > > See Bart's patch about how long the walk of the bio_vecs in the f2fs > completion path can take. We had similar issues in XFS even in the > workqueue completion path due to lack of rescheduling, and these simply > go away when you do the folio manipulation in larger chunks (LAZY_PREEMPT > would avoid the need to explicit rescheduling these days, but that just > papers over the symptoms in this case). > I see. That's also super helpful. Let me kick off the large folio support asap. Thanks. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel