From: Andrew Morton <akpm@linux-foundation.org>
To: Julian Sun <sunjunchao@bytedance.com>
Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
axboe@kernel.dk, hannes@cmpxchg.org, mhocko@kernel.org,
roman.gushchin@linux.dev, shakeel.butt@linux.dev,
muchun.song@linux.dev, willy@infradead.org, jack@suse.cz,
rostedt@goodmis.org, tj@kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v4 0/3] memcg,writeback: flush foreign bdev mappings separately
Date: Mon, 14 Sep 2026 23:06:07 -0700 [thread overview]
Message-ID: <20260914230607.9e4d74933bb589eeef435e8d@linux-foundation.org> (raw)
In-Reply-To: <eba0295b-268a-4573-aeeb-de79b9ca6063@bytedance.com>
On Tue, 15 Sep 2026 13:35:18 +0800 Julian Sun <sunjunchao@bytedance.com> wrote:
> >
> > What is the overall runtime effect of this? IOW, can we see some
> > before-and-after numbers?
>
> I tested this series using a QEMU/KVM VM with 4 vCPUs, 8 GiB RAM,
> cgroup v2 and ext4. Virtual NVMe write bandwidth was capped at
> 200 MiB/s.
>
> A fio job repeatedly overwrote a preinitialized 256 MiB file using
> 64 KiB buffered writes, at 64 MiB/s, for 9 GiB of logical writes.
> Four memcgs, each with memory.high=32 MiB and io.max=2 MiB/s, generated
> metadata and buffered writes to trigger dirty throttling and foreign
> flushes. Concurrently, foreground fio performed 16 GiB of sequential
> direct writes using 1 MiB requests and queue depth 32. Normal periodic
> writeback remained enabled.
>
> Three comparison pairs, with alternating execution order, produced:
>
> Run Kernel File I/O (GiB) Time (s) BW (MiB/s) p99 (ms)
> 1 base 7.19 114.74 142.79 1434
> 1 patched 1.57 88.62 184.87 480
> change -78.22% -22.76% +29.47% -66.52%
>
> 2 base 5.13 103.59 158.16 1434
> 2 patched 1.74 88.65 184.81 497
> change -66.06% -14.42% +16.85% -65.35%
>
> 3 base 6.14 109.27 149.94 1434
> 3 patched 1.73 88.68 184.75 480
> change -71.77% -18.85% +23.22% -66.52%
>
> File I/O is completed block I/O matching the overwritten file's extents,
> including final sync, not requested writeback budgets. The other metrics
> are for the foreground workload.
>
> Across these runs, mean file write I/O decreased by 72.7%, foreground
> bandwidth increased by 23.0%, and completion time decreased by 18.8%.
Thanks. This is super-important info so please condense, summarize and
emphasize this result in the [0/N].
How real-world is this test case? I assume people won't see gains like
this in anything they normally do? I assume this is long-standing
behavior, so if misbehavior like this was regularly being observed then
we'd have fixed it by now.
> >
> > I'd consider this a memcg patch, and not only due to the line counts.
> >
> > Please cc linux-mm on memcg patchsets.
> Sure, will do.
Great. Please update that [0/N] as indicated - help readers understand
the expected real-world impacts. Then send us a v5 and I'll get to
work helping to deliver this to our users.
prev parent reply other threads:[~2026-09-15 6:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 10:31 [PATCH v4 0/3] memcg,writeback: flush foreign bdev mappings separately Julian Sun
2026-09-14 10:31 ` [PATCH v4 1/3] block: introduce bdev_flush_by_dev() Julian Sun
2026-09-14 10:31 ` [PATCH v4 2/3] memcg,writeback: flush foreign bdev mappings separately from owner wbs Julian Sun
2026-09-14 10:31 ` [PATCH v4 3/3] writeback: record bdev targets in foreign writeback tracepoints Julian Sun
2026-09-15 3:59 ` [PATCH v4 0/3] memcg,writeback: flush foreign bdev mappings separately Andrew Morton
2026-09-15 5:35 ` Julian Sun
2026-09-15 6:06 ` Andrew Morton [this message]
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=20260914230607.9e4d74933bb589eeef435e8d@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hannes@cmpxchg.org \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=rostedt@goodmis.org \
--cc=shakeel.butt@linux.dev \
--cc=sunjunchao@bytedance.com \
--cc=tj@kernel.org \
--cc=willy@infradead.org \
/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