From: Feng Tang <feng.tang@intel.com>
To: Shakeel Butt <shakeelb@google.com>
Cc: kernel test robot <oliver.sang@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
0day robot <lkp@intel.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Hillf Danton <hdanton@sina.com>,
Huang Ying <ying.huang@intel.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Michal Koutn?? <mkoutny@suse.com>,
Muchun Song <songmuchun@bytedance.com>,
Roman Gushchin <guro@fb.com>, Tejun Heo <tj@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
lkp@lists.01.org, Xing Zhengjun <zhengjun.xing@linux.intel.com>,
Linux MM <linux-mm@kvack.org>,
mm-commits@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [memcg] 45208c9105: aim7.jobs-per-min -14.0% regression
Date: Fri, 10 Sep 2021 09:08:42 +0800 [thread overview]
Message-ID: <20210910010842.GA94434@shbuild999.sh.intel.com> (raw)
In-Reply-To: <CALvZod6M_sySPM1KaWzb=tkLxXJksVDrSheckXaiBpMC3cNeqw@mail.gmail.com>
On Thu, Sep 09, 2021 at 05:43:40PM -0700, Shakeel Butt wrote:
> On Mon, Sep 6, 2021 at 8:30 PM Feng Tang <feng.tang@intel.com> wrote:
> >
> > Hi Shakeel,
> >
> > On Sun, Sep 05, 2021 at 03:15:46PM -0700, Shakeel Butt wrote:
> > > On Sun, Sep 5, 2021 at 5:27 AM kernel test robot <oliver.sang@intel.com> wrote:
> > [...]
> > > > =========================================================================================
> > > > compiler/cpufreq_governor/disk/fs/kconfig/load/rootfs/tbox_group/test/testcase/ucode:
> > > > gcc-9/performance/1BRD_48G/xfs/x86_64-rhel-8.3/3000/debian-10.4-x86_64-20200603.cgz/lkp-icl-2sp2/disk_rr/aim7/0xd000280
> > > >
> > > > commit:
> > > > 3c28c7680e ("memcg: switch lruvec stats to rstat")
> > > > 45208c9105 ("memcg: infrastructure to flush memcg stats")
> > >
> > > I am looking into this. I was hoping we have resolution for [1] as
> > > these patches touch similar data structures.
> > >
> > > [1] https://lore.kernel.org/all/20210811031734.GA5193@xsang-OptiPlex-9020/T/#u
> >
> > I tried 2 debug methods for that 36.4% vm-scalability regression:
> >
> > 1. Disable the HW cache prefetcher, no effect on this case
> > 2. relayout and add padding to 'struct cgroup_subsys_state', reduce
> > the regression to 3.1%
> >
>
> Thanks Feng but it seems like the issue for this commit is different.
> Rearranging the layout didn't help. Actually the cause of slowdown is
> the call to queue_work() inside __mod_memcg_lruvec_state().
>
> At the moment, queue_work() is called after 32 updates. I changed it
> to 128 and the slowdown of will-it-scale:page_fault[1|2|3] halved
> (from around 10% to 5%). I am unable to run reaim or
> will-it-scale:fallocate2 as I was getting weird errors.
>
> Feng, is it possible for you to run these benchmarks with the change
> (basically changing MEMCG_CHARGE_BATCH to 128 in the if condition
> before queue_work() inside __mod_memcg_lruvec_state())?
When I checked this, I tried different changes, including this batch
number change :), but it didn't recover the regression (the regression
is slightly reduced to about 12%)
Please check if my patch is what you want to test:
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 4d8c9af..a50a69a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -682,7 +682,8 @@ void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
/* Update lruvec */
__this_cpu_add(pn->lruvec_stats_percpu->state[idx], val);
- if (!(__this_cpu_inc_return(stats_flush_threshold) % MEMCG_CHARGE_BATCH))
+// if (!(__this_cpu_inc_return(stats_flush_threshold) % MEMCG_CHARGE_BATCH))
+ if (!(__this_cpu_inc_return(stats_flush_threshold) % 128))
queue_work(system_unbound_wq, &stats_flush_work);
}
Thanks,
Feng
> For the formal patch/fix, I will write down a better explanation on
> what should be the batch size.
>
> thanks,
> Shakeel
next prev parent reply other threads:[~2021-09-10 1:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210902215504.dSSfDKJZu%akpm@linux-foundation.org>
2021-09-05 12:44 ` kernel test robot
2021-09-05 22:15 ` Shakeel Butt
2021-09-07 3:30 ` Feng Tang
2021-09-10 0:43 ` Shakeel Butt
2021-09-10 1:08 ` Feng Tang [this message]
2021-09-10 1:19 ` Shakeel Butt
2021-09-10 2:34 ` Feng Tang
2021-09-10 4:17 ` Shakeel Butt
[not found] ` <20210912111756.4158-1-hdanton@sina.com>
2021-09-12 13:29 ` Feng Tang
2021-09-13 16:41 ` Shakeel Butt
2021-09-13 19:40 ` Shakeel Butt
2021-09-13 19:42 ` Tejun Heo
2021-09-13 20:09 ` Shakeel Butt
2021-09-13 20:10 ` Tejun Heo
2021-09-13 20:13 ` Shakeel Butt
2021-09-14 2:13 ` Feng Tang
2021-09-14 4:20 ` Shakeel Butt
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=20210910010842.GA94434@shbuild999.sh.intel.com \
--to=feng.tang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=lkp@lists.01.org \
--cc=m.szyprowski@samsung.com \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=mm-commits@vger.kernel.org \
--cc=oliver.sang@intel.com \
--cc=shakeelb@google.com \
--cc=songmuchun@bytedance.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®