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]) by smtp.lore.kernel.org (Postfix) with ESMTP id E093AC71133 for ; Wed, 11 Jun 2025 15:51:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1FE6E6B009E; Wed, 11 Jun 2025 11:51:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 187FE6B009F; Wed, 11 Jun 2025 11:51:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 04F226B00A2; Wed, 11 Jun 2025 11:51:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D77536B009E for ; Wed, 11 Jun 2025 11:51:48 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 525B281058 for ; Wed, 11 Jun 2025 15:51:48 +0000 (UTC) X-FDA: 83543560296.17.1C38BAB Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf10.hostedemail.com (Postfix) with ESMTP id 6EA70C0006 for ; Wed, 11 Jun 2025 15:51:46 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iwkK3sVu; spf=pass (imf10.hostedemail.com: domain of djwong@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=djwong@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=1749657106; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=R8+lkTfzokc88TdUJ8NpqEICvfoajt7yboALcBqiw/Y=; b=2LMHDefAcv5WeKRv8TB2dNSaL/JrD+2dHTckh/Oebvb5nUZgyrGV/fh+kWuyc+pb6+MflC jSoWJQf7zeCyjyKGh9Zma2avo+eeeAqWrPfFb5X2gsA2+q7vMv8xQ/6mq1qh3W8n2uNYzX 9Yc492aviSfTTW5klNJYAUdmwn9QtOk= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iwkK3sVu; spf=pass (imf10.hostedemail.com: domain of djwong@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=djwong@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749657106; a=rsa-sha256; cv=none; b=nf5pBZy8Fx5yBxT7Oq6b0ao5xBh0NfETLugYdqqlhfnnEkKUZC9rbPqt+PmA4UK6wJZfZK uEKXETshULkE8p3lg8LDQh+kyboQD+VNNTjgjROxDOR8Vh/IT/VhBWeEHjgMrnv/Vd4K4/ q5w6DCcqVA/WKBHXlJrCYlyJ1IBe1e4= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 81671A518F6; Wed, 11 Jun 2025 15:51:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CC8CC4CEE3; Wed, 11 Jun 2025 15:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749657105; bh=Skl9KDuzJqFaqd+d7kcHfX6PNCmoq83oIlnZ4Q2zi04=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iwkK3sVut+NThYh8qunzKpQ31Iwkrb1zjgxChbVqqV+oYpwR7fQbZPVg5A4Edk1ro DCx3vF9ZtNT6ZDuYi3UopU5ifN5EotQF9zpy+5l37R7AVrIL3EIjhVePvIh9dIB4ZS G/6R65R4Dn9ayyjY0KN/zRtZ28f2pepHw4nRUylMoAEErlDyz33KfDqQ4RyC751rg1 +FDXedv6UJgjDRzfI7isBuziAum8IKVKFsQzx3ZXq/U/fnwpekElwBhfmXNCNgWWCD fqUIl1THgMSG4gfel9y+JyZmo6pLuQ80/jT72VVbjkgut1TcwbA6dDPc6rIL2IitzD 9a5tjk1UXZF3w== Date: Wed, 11 Jun 2025 08:51:44 -0700 From: "Darrick J. Wong" To: Kundan Kumar Cc: Anuj gupta , Christoph Hellwig , Anuj Gupta/Anuj Gupta , Kundan Kumar , jaegeuk@kernel.org, chao@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, miklos@szeredi.hu, agruenba@redhat.com, trondmy@kernel.org, anna@kernel.org, akpm@linux-foundation.org, willy@infradead.org, mcgrof@kernel.org, clm@meta.com, david@fromorbit.com, amir73il@gmail.com, axboe@kernel.dk, ritesh.list@gmail.com, dave@stgolabs.net, p.raghav@samsung.com, da.gomez@samsung.com, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, gfs2@lists.linux.dev, linux-nfs@vger.kernel.org, linux-mm@kvack.org, gost.dev@samsung.com Subject: Re: [PATCH 00/13] Parallelizing filesystem writeback Message-ID: <20250611155144.GD6138@frogsfrogsfrogs> References: <20250529111504.89912-1-kundan.kumar@samsung.com> <20250602141904.GA21996@lst.de> <20250603132434.GA10865@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 6EA70C0006 X-Stat-Signature: aob6193q6ky64dz79fya5twyq9zy85ar X-Rspam-User: X-HE-Tag: 1749657106-724788 X-HE-Meta: U2FsdGVkX1+y6gsLA/CIzba8J4s0QfxVFBLzS8VDWCmdoY1KFu/ZF6YYU8cVYont+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tPtnyAQ0gO57fLyzagafBILX9p+JbUHzdxC0NUnyFMvYnXZRH4k4/At1/Lowa9rrILNIX8EpEsHEAkBuAh3hQhNnZNgPGsxTAzQI5OwA1oFl0UcVJ+AOYC2CNWVqPaLWvuJV0iRbFYJi1G+IkJe+P5kT4yKt0icNXNc9NAAfJJKb9ZtKHBeQMO78idISQsy X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Jun 04, 2025 at 02:52:34PM +0530, Kundan Kumar wrote: > > > > For xfs used this command: > > > > xfs_io -c "stat" /mnt/testfile > > > > And for ext4 used this: > > > > filefrag /mnt/testfile > > > > > > filefrag merges contiguous extents, and only counts up for discontiguous > > > mappings, while fsxattr.nextents counts all extent even if they are > > > contiguous. So you probably want to use filefrag for both cases. > > > > Got it — thanks for the clarification. We'll switch to using filefrag > > and will share updated extent count numbers accordingly. > > Using filefrag, we recorded extent counts on xfs and ext4 at three > stages: > a. Just after a 1G random write, > b. After a 30-second wait, > c. After unmounting and remounting the filesystem, > > xfs > Base > a. 6251 b. 2526 c. 2526 > Parallel writeback > a. 6183 b. 2326 c. 2326 Interesting that the mapping record count goes down... I wonder, you said the xfs filesystem has 4 AGs and 12 cores, so I guess wb_ctx_arr[] is 12? I wonder, do you see a knee point in writeback throughput when the # of wb contexts exceeds the AG count? Though I guess for the (hopefully common) case of pure overwrites, we don't have to do any metadata updates so we wouldn't really hit a scaling limit due to ag count or log contention or whatever. Does that square with what you see? > ext4 > Base > a. 7080 b. 7080 c. 11 > Parallel writeback > a. 5961 b. 5961 c. 11 Hum, that's particularly ... interesting. I wonder what the mapping count behaviors are when you turn off delayed allocation? --D > Used the same fio commandline as earlier: > fio --filename=/mnt/testfile --name=test --bs=4k --iodepth=1024 > --rw=randwrite --ioengine=io_uring --fallocate=none --numjobs=1 > --size=1G --direct=0 --eta-interval=1 --eta-newline=1 > --group_reporting > > filefrag command: > filefrag /mnt/testfile >