From: Feng Tang <feng.tang@intel.com>
To: Shakeel Butt <shakeelb@google.com>
Cc: Tejun Heo <tj@kernel.org>, Hillf Danton <hdanton@sina.com>,
LKML <linux-kernel@vger.kernel.org>,
Xing Zhengjun <zhengjun.xing@linux.intel.com>,
Linux MM <linux-mm@kvack.org>
Subject: Re: [memcg] 45208c9105: aim7.jobs-per-min -14.0% regression
Date: Tue, 14 Sep 2021 10:13:22 +0800 [thread overview]
Message-ID: <20210914021322.GE56674@shbuild999.sh.intel.com> (raw)
In-Reply-To: <CALvZod7BFZ1M4KWYWEhRHdZCeLV8Km=NqpkCZ=k67mBNSgX0cQ@mail.gmail.com>
Hi Shakeel,
On Mon, Sep 13, 2021 at 01:13:57PM -0700, Shakeel Butt wrote:
> On Mon, Sep 13, 2021 at 1:10 PM Tejun Heo <tj@kernel.org> wrote:
> >
> > On Mon, Sep 13, 2021 at 01:09:11PM -0700, Shakeel Butt wrote:
> > > Thanks a lot for the explanation. Are there any concerns to call
> > > cgroup_rstat_flush_irqsafe(root_mem_cgroup->css.cgroup) in system_wq?
> > > This will be called every 2 seconds, so, we can assume the updated
> > > tree would be small most of the time.
> >
> > I can't think of a reason why this would be problematic.
> >
>
> Thanks again.
>
> Feng, is it possible to re-run these benchmarks with
> queue_work(system_wq) instead of queue_work(system_unbound_wq)?
I just run the patch twice, and there was no obvious change, the
hotspot is still the spinlock.
Thanks,
Feng
$git-diff aa48e47e
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 4d8c9af..fa9cae9 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -683,7 +683,7 @@ 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))
- queue_work(system_unbound_wq, &stats_flush_work);
+ queue_work(system_wq, &stats_flush_work);
}
7e1c0d6f58207e7e aa48e47e3906c332eaf1e5d7b58 1638eee6432c1a5175685a7945a
---------------- --------------------------- ---------------------------
\ | \ | \
648.62 +243.0% 2224 ± 3% +246.1% 2244 aim7.cpu
588139 -13.4% 509421 -13.5% 508738 aim7.jobs-per-min
196.05 -13.4% 169.81 -13.5% 169.58 aim7.jobs-per-min-per-task
3.93 ± 3% +62.8 66.70 +63.4 67.37 pp.child.native_queued_spin_lock_slowpath
3.96 ± 4% +62.8 66.76 +63.5 67.46 pp.child._raw_spin_lock_irqsave
3.66 ± 5% +62.9 66.54 +63.6 67.22 pp.child.lock_page_lruvec_irqsave
0.00 +0.1 0.10 ± 5% +0.1 0.09 pp.self.queue_work_on
0.00 +0.2 0.18 ± 5% +0.2 0.22 pp.self.cgroup_rstat_flush_locked
0.00 +0.6 0.60 ± 7% +0.7 0.72 ± 3% pp.self.mem_cgroup_css_rstat_flush
0.19 +0.7 0.86 ± 5% +0.7 0.84 ± 4% pp.self.cgroup_rstat_updated
3.92 ± 3% +62.8 66.70 +63.4 67.37 pp.self.native_queued_spin_lock_slowpath
next prev parent reply other threads:[~2021-09-14 2:13 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
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 [this message]
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=20210914021322.GE56674@shbuild999.sh.intel.com \
--to=feng.tang@intel.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeelb@google.com \
--cc=tj@kernel.org \
--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®