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 0EA43C5AD49 for ; Tue, 3 Jun 2025 13:53:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7D46B6B046B; Tue, 3 Jun 2025 09:53:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 784C96B046C; Tue, 3 Jun 2025 09:53:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 673DA6B046D; Tue, 3 Jun 2025 09:53:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 46E0D6B046B for ; Tue, 3 Jun 2025 09:53:01 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0F076140A28 for ; Tue, 3 Jun 2025 13:53:01 +0000 (UTC) X-FDA: 83514230562.18.B4291AD Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by imf16.hostedemail.com (Postfix) with ESMTP id 128F0180007 for ; Tue, 3 Jun 2025 13:52:58 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=GzPf1ATl; spf=pass (imf16.hostedemail.com: domain of anuj1072538@gmail.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=anuj1072538@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1748958779; 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=Y3dgRxegT5qf67xryaScOvVUZaIAW5sj2uHc8EGQ1+g=; b=rKlbyGvaJvbtWMvI7SwTXrhvrfDJjScpGBBW1C3P+EgTdJuoyvxH5IwhaKKZvQ1+JYFffo gprbCylohuvn1lxo55tTFw3NW3V+RIg699UIhAsZmnaUEgMCRephGjqgtMOtaa6i4O81Q0 RkEN0z5mIpErewMK5IuHW+H3DV0+4Bs= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=GzPf1ATl; spf=pass (imf16.hostedemail.com: domain of anuj1072538@gmail.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=anuj1072538@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1748958779; a=rsa-sha256; cv=none; b=keDY2Gm0bUWEERuAmAicLbanAgman4Pfh84Ztrs8NfhH/svUF+8p1dUhrLyprn46lF71oR a215QsW7hHhsEWElr7VdZTZtSTi4dA9SFlOa4HHyzxUageN/r6zNLAzRTqVXgdm0msIr/O 6Nx7ogf5+bUqlOzxBJ4NrqgOyH3shcY= Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-606c5c9438fso979098a12.2 for ; Tue, 03 Jun 2025 06:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748958777; x=1749563577; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Y3dgRxegT5qf67xryaScOvVUZaIAW5sj2uHc8EGQ1+g=; b=GzPf1ATl4FzpAFZBFQBDEa+B9Se4Spj90k2YpbteokMySeVoSPlLGmpHFaXYxRllv0 2YJUC0XLKTKAoNwGmAR6U7RG18kRntGXSvNqTlXInC+X4nuMuJN9cMly+1rPPwGftB5t o8ZPf0GVoybqSYcMMkffQxD1NXH6Qos/l5HXJHLM/CoHx2l/1cCrX5JS2g4Oi0/JcRWK gnRFFYJvZcKySZSXih69NLPLwQI+s4Ue1yMayq/pe8DGiQi0sYf4DxdqNhdDniuo+YJS CYT8yKvejia8bdflS4tMXGAltSxzwwtr97g5CYpEaLnE89+EhxP9I4VStV5mSvWxISqr 8jxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748958777; x=1749563577; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y3dgRxegT5qf67xryaScOvVUZaIAW5sj2uHc8EGQ1+g=; b=Yc0SFYJAXAmHcmjd9nzvzn+ZqRdDemReMhN1CPY2AQqkXSuAR7/gq6HREq0GZRfLqm nTrUK+E96d2ohwoP9QW6Pf3IhutmHglQoFdilexvWJF0mN65Jcy+qqv7nJRWiexOAZPI O6Z0f4z3DLMaWyoCRNLuhw4BIQCqLPkLdzsnrw2PPmNc1iYDiLLDfLa+rave1U6rmuSM 6pTSUSl3KJoHrnvrM16UM1ByMEltZGd4xnSiXxb8krwCBF/Mg14O6i5JQXWhmuJ82pbP gXMUIrNg8RJTyIbpK/hIPxHVbQS0LTD+HauqVa9xFYrxA/IHzU3n4XPbPutEF5F9hzVs 127g== X-Forwarded-Encrypted: i=1; AJvYcCVA/aJV8J3wUZmNU1CEh1uQU1OPwqOOAFnlSgtsfkaJZ1wlAJyqbgGfm3kFs9mt6c5guSgOajX9+Q==@kvack.org X-Gm-Message-State: AOJu0Yw9QmC5VzmTTPuxfVV3A1RlWE1Xkxhq4QDPc2OPmRhfFBMVqXfW 7Bag7VCOECDWWexL7R9idtgft2DzOd10dqpnGxYw4Fj+IBIXFavJ586TQtALJonU7fQspmCn/E2 pDFo5T6xzKe8PahW6IFKH1iKlv0FnOQ== X-Gm-Gg: ASbGncuJP7WC9iRVtHsuJuzWTEAaHDWb+zgjuyrumh5K9Rd08uIs4ocaAKt+E1Fj4Yo VYJbTGMTCS66OzEuPWN6RsZeS/1YM9jDEdTQDoFTrjwcPwxf+Cs0k0ujDZF/yIJD3AxmOHDhOmG 4HtyGxXEnSwE9ZZbH0nRF5kpTkCnIocfDFhpo45EFrNuJgkcPJGpfYVtiSq7/JuwyATnwQ6ycyx w== X-Google-Smtp-Source: AGHT+IFus+lYy/Vn8DX7AejSTWq5DWSZv2otFfVWZOt+Ot1Cw3NBGg/aiRMWu1o2ZMIdoZsQp1gzV5igzu9cyaTxn5s= X-Received: by 2002:a17:907:3f0f:b0:ad8:9909:20b5 with SMTP id a640c23a62f3a-adb496037b7mr1318776566b.56.1748958777045; Tue, 03 Jun 2025 06:52:57 -0700 (PDT) MIME-Version: 1.0 References: <20250529111504.89912-1-kundan.kumar@samsung.com> <20250602141904.GA21996@lst.de> <20250603132434.GA10865@lst.de> In-Reply-To: <20250603132434.GA10865@lst.de> From: Anuj gupta Date: Tue, 3 Jun 2025 19:22:18 +0530 X-Gm-Features: AX0GCFs142Om3-wJu99daJuShs3COk0AlQwDiy7BvMajL8e3IU6AzAyzk8BCwWQ Message-ID: Subject: Re: [PATCH 00/13] Parallelizing filesystem writeback To: Christoph Hellwig Cc: "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, djwong@kernel.org, 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, kundanthebest@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: s55yy39ch6qyejdkze9nu1tdqt3y1j8y X-Rspamd-Queue-Id: 128F0180007 X-Rspam-User: X-Rspamd-Server: rspam02 X-HE-Tag: 1748958778-28168 X-HE-Meta: U2FsdGVkX19mj9jnvbfyo1N/jH1RuErm69pdzcFEF9nNVBy8ZaCGgwamg7U1a5XTq0TNkA8oA9kNmBpzMQ/ekm0wqwIhAI2GroMtSlK4dqdziVJs4g5elN0Np7WEX9/MTQZl92ph/biBrWXNNuOGvx1wyChaLnkXjLssRKzjaGcesPG9yDE1BhGi3mpDKry86gd+4n9ibxnkzQoqPmvM7ZmxVrMzsrX78b74fa1c9bYd9zImXrjnj07Dbd9VU87pah2hhIw+Fs+ULtF6S2Fu9VyLMOA2+HvboT3WYpBvurCyTdFfCrTsmiRCzzcsRvjiJ5rWNOhM6hEqypEqf3KCGLT6+163ugP+FwvtJTyy5Oqo/iM15CHz1gVlbJexcU8It0b3/4aU/+po9yVIWvIT84B0RWkV7m9xETuFboyvZlfF9ntkJ18H+Ikc8OQwc7uiyaOJvDwGMaKvUHPazUt/Qd7dPfyMCSPWbNZNuwVwql1NnPWn+kG539wDDPdQ7NkGM+vKPXMeknWH5I57nO+Ma2uwh3XmCFUJCcHbwja3/SjKe3l9SdSIp6aU6AYv3EKfzkQzT9MjAZY6ieGTtbsgSiZb4HLeL9Ab5q2wVmWClsQw2QlpoIRa/pOX3e+mhmWLEiytzbkyJ5lmlusJChRWyqUi4MlPj+oq8OVaLj+QCMcgOFtUKm/of0Un1Jg+LyJBs28KWjdY7H41JkgF6VH4wZu0SzPk1zwlt4zWBqsI4YedJr58WAdruHYGQYpVSh8qQaRUdoc2z3iUNZHEbRGZLgizhOBMF/H+iwclin0sGGDxVxevT8pu3hcE7SXdelNxy8P08PZxaUN5qe/vDo5Jeooo60sMd+jecHtdyvvP8ohyRUuOUEoKVENcXRu71crKzeW7TROR6Ydh37XP3krtu4O/030Xc7NWasQWqxc1GHY39a98d6qqHaJOE+XV6gIx5F7/uUFIqUwcEAa5Rdb 8LaKxXQs KjZOH24O4oxXIwUFCKZ/55g7TD3ljwudkCIzWq7q6ikPIYqNJXmu7CiapWqQA8ij7I5bdo5Jve3GRLuw17wE04ve4d56QalgcX+1MvJuQIIJ8yu5sVO25C2KKRx3s+hBXTbW8JXGBsAZXy4ON6GsR9GOkFWsjVDKlEzsXQsB4dwsPJemIC/GzLPVWK3bAIRrKhR8QbMaZO/bNuEc+FEm39B/6mqozGuDeT4tX7TWR/gG2WOXK/pa22/M5TWHtW6+Xq3pZAKrOpE5ylgZc1vPXqjtmFt9vZmmI8g2Wzp/V2gBprV4Gp4r/Y47Q/9YkNbbJpsfLEGvvz/YpRROqoxGW4BnUOHHJCef8c7VdND+2qhrbp4pkC6+IYRTKeQzNbWbf/QHbOQu33fScvPv6S+XbM+NoKWb2XNQbhraUp55hcfJ8uBsqGrtfeFZExEGfDcTZbFT8hg9/KoRNk9ezSfuWlnUaSw== 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 Tue, Jun 3, 2025 at 6:54=E2=80=AFPM Christoph Hellwig wrote= : > > On Tue, Jun 03, 2025 at 02:46:20PM +0530, Anuj Gupta/Anuj Gupta wrote: > > On 6/2/2025 7:49 PM, Christoph Hellwig wrote: > > > On Thu, May 29, 2025 at 04:44:51PM +0530, Kundan Kumar wrote: > > > Well, the proper thing would be to figure out a good default and not > > > just keep things as-is, no? > > > > We observed that some filesystems, such as Btrfs, don't benefit from > > this infra due to their distinct writeback architecture. To preserve > > current behavior and avoid unintended changes for such filesystems, > > we have kept nr_wb_ctx=3D1 as the default. Filesystems that can take > > advantage of parallel writeback (xfs, ext4) can opt-in via a mount > > option. Also we wanted to reduce risk during initial integration and > > hence kept it as opt-in. > > A mount option is about the worst possible interface for behavior > that depends on file system implementation and possibly hardware > chacteristics. This needs to be set by the file systems, possibly > using generic helpers using hardware information. Right, that makes sense. Instead of using a mount option, we can introduce generic helpers to initialize multiple writeback contexts based on underlying hardware characteristics =E2=80=94 e.g., number of CPUs= or NUMA topology. Filesystems like XFS and EXT4 can then call these helpers during mount to opt into parallel writeback in a controlled way. > > > Used PMEM of 6G > > battery/capacitor backed DRAM, or optane? We emulated PMEM using DRAM by following the steps here: https://www.intel.com/content/www/us/en/developer/articles/training/how-to-= emulate-persistent-memory-on-an-intel-architecture-server.html > > > > > and NVMe SSD of 3.84 TB > > Consumer drive, enterprise drive? It's an enterprise-grade drive =E2=80=94 Samsung PM1733 > > > 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 =E2=80=94 thanks for the clarification. We'll switch to using filefr= ag and will share updated extent count numbers accordingly.