From: "Michal Koutný" <mkoutny@suse.com>
To: Ivan Babrou <ivan@cloudflare.com>
Cc: cgroups@vger.kernel.org, Linux MM <linux-mm@kvack.org>,
kernel-team <kernel-team@cloudflare.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <muchun.song@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Expensive memory.stat + cpu.stat reads
Date: Mon, 10 Jul 2023 16:44:53 +0200 [thread overview]
Message-ID: <gbqumqkxixvvrbbqh55rw6thgfa67tw2kkcuauc4xj5t6pnivd@3yfkokngo43w> (raw)
In-Reply-To: <CABWYdi0c6__rh-K7dcM_pkf9BJdTRtAU08M43KO9ME4-dsgfoQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 795 bytes --]
Hello.
On Fri, Jun 30, 2023 at 04:22:28PM -0700, Ivan Babrou <ivan@cloudflare.com> wrote:
> As you might've noticed from the output, splitting the loop into two
> makes the code run 10x faster.
That is curious.
> We're running Linux v6.1 (the output is from v6.1.25) with no patches
> that touch the cgroup or mm subsystems, so you can assume vanilla
> kernel.
Have you watched for this on older kernels too?
> I am happy to try out patches or to do some tracing to help understand
> this better.
I see in your reproducer you tried swapping order of controllers
flushed.
Have you also tried flushing same controller twice (in the inner loop)?
(Despite the expectation is that it shouldn't be different from half the
scenario where ran two loops.)
Thanks,
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-07-10 14:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 23:22 Ivan Babrou
2023-07-06 6:20 ` Shakeel Butt
2023-07-10 23:21 ` Ivan Babrou
2023-07-11 0:44 ` Waiman Long
2023-07-13 23:25 ` Ivan Babrou
2023-07-14 17:23 ` Waiman Long
2023-07-15 0:00 ` Ivan Babrou
2023-07-15 0:30 ` Ivan Babrou
2023-08-11 22:03 ` Ivan Babrou
2023-08-11 22:27 ` Waiman Long
2023-08-11 22:35 ` Ivan Babrou
2023-08-12 2:33 ` Shakeel Butt
2023-08-14 17:56 ` Ivan Babrou
2023-08-11 23:43 ` Yosry Ahmed
2023-08-12 0:01 ` Yosry Ahmed
2023-08-15 0:18 ` Tejun Heo
2023-08-15 0:30 ` Ivan Babrou
2023-08-15 0:31 ` Yosry Ahmed
2023-07-15 0:14 ` Ivan Babrou
2023-07-10 14:44 ` Michal Koutný [this message]
2023-07-10 23:23 ` Ivan Babrou
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=gbqumqkxixvvrbbqh55rw6thgfa67tw2kkcuauc4xj5t6pnivd@3yfkokngo43w \
--to=mkoutny@suse.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=ivan@cloudflare.com \
--cc=kernel-team@cloudflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@google.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