Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Baolin Liu <liubaolin12138@163.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca, libaokun@linux.alibaba.com
Cc: ojaswin@linux.ibm.com, ritesh.list@gmail.com,
	yi.zhang@huawei.com, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org, wangguanyu@vivo.com,
	adilger@dilger.ca, liubaolin12138@163.com
Subject: [PATCH v4 v4 0/3] ext4: improve mballoc statistics reporting and control
Date: Fri,  8 May 2026 17:34:25 +0800	[thread overview]
Message-ID: <20260508093428.5814-1-liubaolin12138@163.com> (raw)

This series improves ext4 mballoc statistics reporting and control.
Compared with v3, this version adds a new patch to convert s_mb_stats
to atomic_t and use atomic operations for its accesses, so as to avoid
potential concurrent accesses to this variable.

Patch 3 is updated according to comments from Ted and BaoKun. Writing 0
to /proc/fs/ext4/<dev>/mb_stats disables statistics collection, writing
1 enables it, and writing -1 clears the current statistics and enables
collection. The related documentation is updated accordingly, and the
sysfs mb_stats entry is documented as deprecated in favor of the proc
mb_stats entry.

Changes since v3:
  - add a new patch to convert s_mb_stats to atomic_t and use atomic
    operations for its accesses
  - update /proc/fs/ext4/<dev>/mb_stats write semantics based on comments
    from Ted and BaoKun
  - update related documentation and document sysfs mb_stats as deprecated

Baolin Liu (3):
  ext4: add blocks_allocated to mb_stats output
  ext4: use atomic operations for s_mb_stats accesses
  ext4: allow controlling mballoc stats through proc mb_stats

 Documentation/ABI/testing/sysfs-fs-ext4 |  3 +-
 Documentation/admin-guide/ext4.rst      |  9 +++-
 Documentation/filesystems/proc.rst      | 13 +-----
 fs/ext4/ext4.h                          |  3 +-
 fs/ext4/mballoc.c                       | 57 +++++++++++++++++++------
 fs/ext4/sysfs.c                         | 55 ++++++++++++++++++++++--
 6 files changed, 109 insertions(+), 31 deletions(-)

-- 
2.51.0


             reply	other threads:[~2026-05-08  9:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  9:34 Baolin Liu [this message]
2026-05-08  9:34 ` [PATCH v4 v4 1/3] ext4: add blocks_allocated to mb_stats output Baolin Liu
2026-05-08  9:34 ` [PATCH v4 v4 2/3] ext4: use atomic operations for s_mb_stats accesses Baolin Liu
     [not found]   ` <20260508200245.A703BC2BCC7@smtp.kernel.org>
2026-05-12  2:11     ` liubaolin
2026-05-08  9:34 ` [PATCH v4 v4 3/3] ext4: allow controlling mballoc stats through proc mb_stats Baolin Liu
2026-05-08 10:31 ` [PATCH v4 v4 0/3] ext4: improve mballoc statistics reporting and control liubaolin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260508093428.5814-1-liubaolin12138@163.com \
    --to=liubaolin12138@163.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=adilger@dilger.ca \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=tytso@mit.edu \
    --cc=wangguanyu@vivo.com \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox