From: Feng Tang <feng.tang@intel.com>
To: Michal Koutn?? <mkoutny@suse.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
andi.kleen@intel.com
Cc: kernel test robot <oliver.sang@intel.com>,
Roman Gushchin <guro@fb.com>, Michal Hocko <mhocko@suse.com>,
Shakeel Butt <shakeelb@google.com>,
Balbir Singh <bsingharora@gmail.com>, Tejun Heo <tj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
lkp@lists.01.org, kernel test robot <lkp@intel.com>,
"Huang, Ying" <ying.huang@intel.com>,
Zhengjun Xing <zhengjun.xing@linux.intel.com>
Subject: Re: [mm] 2d146aa3aa: vm-scalability.throughput -36.4% regression
Date: Tue, 31 Aug 2021 14:30:36 +0800 [thread overview]
Message-ID: <20210831063036.GA46357@shbuild999.sh.intel.com> (raw)
In-Reply-To: <YSzwWIeapkzNElwV@blackbook>
Hi Michal,
On Mon, Aug 30, 2021 at 04:51:04PM +0200, Michal Koutn?? wrote:
> Hello Feng.
>
> On Wed, Aug 18, 2021 at 10:30:04AM +0800, Feng Tang <feng.tang@intel.com> wrote:
> > As Shakeel also mentioned, this 0day's vm-scalability doesn't involve
> > any explicit mem_cgroup configurations.
>
> If it all happens inside root memcg, there should be no accesses to the
> 0x10 offset since the root memcg is excluded from refcounting. (Unless
> the modified cacheline is a μarch artifact. Actually, for the lack of
> other ideas, I was thinking about similar cause even for non-root memcgs
> since the percpu refcounting is implemented via a segment register.)
Thought I haven't checked the exact memcg that the perf-c2c hot spots
pointed to, I don't think it's the root memcg. From debug, in the test
run, the OS has created about 50 memcgs before vm-scalability test run,
mostly by systemd-servces, and during the test there is no more new
memcg created.
> Is this still relevant? (You refer to it as 0day's vm-scalability
> issue.)
>
> By some rough estimates there could be ~10 cgroup_subsys_sets per 10 MiB
> of workload, so the 128B padding gives 1e-4 relative overhead (but
> presumably less in most cases). I also think it acceptable (size-wise).
>
> Out of curiosity, have you measured impact of reshuffling the refcnt
> member into the middle of the cgroup_subsys_state (keeping it distant
> both from .cgroup and .parent)?
Yes, I tried many re-arrangement of the members of cgroup_subsys_state,
and even close members of memcg, but there were no obvious changes.
What can recover the regresion is adding 128 bytes padding in the css,
no matter at the start, end or in the middle.
Some finding is, this could be related with HW cache prefetcher.
From this article
https://software.intel.com/content/www/us/en/develop/articles/disclosure-of-hw-prefetcher-control-on-some-intel-processors.html
There are four bits controlling different types of prefetcher, on the
testbox (CascadeLake AP platform), they are all enabled by default.
When we disable the "L2 hardware prefetcher" (bit 0), the permance
for commit 2d146aa3aa8 is almost the same as its parent commit.
So it seems to be affected about HW cache prefechter's policy, the
test's access pattern changes the HW prefetcher policy, which in
turn affect the performance.
Also the test shows the regression is platform dependent, that regression
could be seen on Cascade Lake AP (36%) and SP (20%), but not on a
Icelake SP 2S platform.
Thanks,
Feng
next prev parent reply other threads:[~2021-08-31 6:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 3:17 kernel test robot
2021-08-11 5:59 ` Linus Torvalds
2021-08-11 20:12 ` Johannes Weiner
2021-08-12 3:19 ` Feng Tang
2021-08-16 3:28 ` Feng Tang
2021-08-16 21:41 ` Johannes Weiner
2021-08-17 2:45 ` Feng Tang
2021-08-17 16:47 ` Michal Koutný
2021-08-17 17:10 ` Shakeel Butt
2021-08-18 2:30 ` Feng Tang
2021-08-30 14:51 ` Michal Koutný
2021-08-31 6:30 ` Feng Tang [this message]
2021-08-31 9:23 ` Michal Koutný
2021-09-01 4:50 ` Feng Tang
2021-09-01 15:12 ` Andi Kleen
2021-09-02 1:35 ` Feng Tang
2021-09-02 2:23 ` Andi Kleen
2021-09-02 3:46 ` Feng Tang
2021-09-02 10:53 ` Michal Koutný
2021-09-02 13:39 ` Feng Tang
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=20210831063036.GA46357@shbuild999.sh.intel.com \
--to=feng.tang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi.kleen@intel.com \
--cc=bsingharora@gmail.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lkp@lists.01.org \
--cc=mhocko@suse.com \
--cc=mkoutny@suse.com \
--cc=oliver.sang@intel.com \
--cc=shakeelb@google.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=ying.huang@intel.com \
--cc=zhengjun.xing@linux.intel.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
all inboxes | Powered by JetHome®