From: Xin Long <lucien.xin@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
kernel test robot <oliver.sang@intel.com>,
Eric Dumazet <edumazet@google.com>,
Shakeel Butt <shakeelb@google.com>,
Soheil Hassas Yeganeh <soheil@google.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
network dev <netdev@vger.kernel.org>,
linux-s390@vger.kernel.org, mptcp@lists.linux.dev,
"linux-sctp @ vger . kernel . org" <linux-sctp@vger.kernel.org>,
lkp@lists.01.org, kbuild test robot <lkp@intel.com>,
Huang Ying <ying.huang@intel.com>,
feng.tang@intel.com, zhengjun.xing@linux.intel.com,
fengwei.yin@intel.com, Ying Xu <yinxu@redhat.com>
Subject: Re: [net] 4890b686f4: netperf.Throughput_Mbps -69.4% regression
Date: Thu, 23 Jun 2022 18:50:07 -0400 [thread overview]
Message-ID: <CADvbK_eQUmb942vC+bG+NRzM1ki1LiCydEDR1AezZ35Jvsdfnw@mail.gmail.com> (raw)
In-Reply-To: <CADvbK_csvmkKe46hT9792=+Qcjor2EvkkAnr--CJK3NGX-N9BQ@mail.gmail.com>
On Wed, Jun 22, 2022 at 11:08 PM Xin Long <lucien.xin@gmail.com> wrote:
>
> Yes, I'm working on it. I couldn't see the regression in my env with
> the 'reproduce' script attached.
> I will try with lkp tomorrow.
>
> Thanks.
>
> On Wed, Jun 22, 2022 at 8:29 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > Could someone working on SCTP double check this is a real regression?
> > Feels like the regression reports are flowing at such rate its hard
> > to keep up.
> >
> > >
> > > commit:
> > > 7c80b038d2 ("net: fix sk_wmem_schedule() and sk_rmem_schedule() errors")
> > > 4890b686f4 ("net: keep sk->sk_forward_alloc as small as possible")
> > >
> > > 7c80b038d23e1f4c 4890b686f4088c90432149bd6de
> > > ---------------- ---------------------------
> > > %stddev %change %stddev
> > > \ | \
> > > 15855 -69.4% 4854 netperf.Throughput_Mbps
> > > 570788 -69.4% 174773 netperf.Throughput_total_Mbps
...
> > > 0.00 +5.1 5.10 ± 5% perf-profile.calltrace.cycles-pp.__sk_mem_reduce_allocated.sctp_wfree.skb_release_head_state.consume_skb.sctp_chunk_put
> > > 0.17 ±141% +5.3 5.42 ± 6% perf-profile.calltrace.cycles-pp.skb_release_head_state.consume_skb.sctp_chunk_put.sctp_outq_sack.sctp_cmd_interpreter
> > > 0.00 +5.3 5.35 ± 6% perf-profile.calltrace.cycles-pp.sctp_wfree.skb_release_head_state.consume_skb.sctp_chunk_put.sctp_outq_sack
> > > 0.00 +5.5 5.51 ± 6% perf-profile.calltrace.cycles-pp.__sk_mem_reduce_allocated.skb_release_head_state.kfree_skb_reason.sctp_recvmsg.inet_recvmsg
> > > 0.00 +5.7 5.65 ± 6% perf-profile.calltrace.cycles-pp.skb_release_head_state.kfree_skb_reason.sctp_recvmsg.inet_recvmsg.____sys_recvmsg
...
> > > 0.00 +4.0 4.04 ± 6% perf-profile.children.cycles-pp.mem_cgroup_charge_skmem
> > > 2.92 ± 6% +4.2 7.16 ± 6% perf-profile.children.cycles-pp.sctp_outq_sack
> > > 0.00 +4.3 4.29 ± 6% perf-profile.children.cycles-pp.__sk_mem_raise_allocated
> > > 0.00 +4.3 4.32 ± 6% perf-profile.children.cycles-pp.__sk_mem_schedule
> > > 1.99 ± 6% +4.4 6.40 ± 6% perf-profile.children.cycles-pp.consume_skb
> > > 1.78 ± 6% +4.6 6.42 ± 6% perf-profile.children.cycles-pp.kfree_skb_reason
> > > 0.37 ± 8% +5.0 5.40 ± 6% perf-profile.children.cycles-pp.sctp_wfree
> > > 0.87 ± 9% +10.3 11.20 ± 6% perf-profile.children.cycles-pp.skb_release_head_state
> > > 0.00 +10.7 10.66 ± 6% perf-profile.children.cycles-pp.__sk_mem_reduce_allocated
...
> > > 0.00 +1.2 1.19 ± 7% perf-profile.self.cycles-pp.try_charge_memcg
> > > 0.00 +2.0 1.96 ± 6% perf-profile.self.cycles-pp.page_counter_uncharge
> > > 0.00 +2.1 2.07 ± 5% perf-profile.self.cycles-pp.page_counter_try_charge
> > > 1.09 ± 8% +2.8 3.92 ± 6% perf-profile.self.cycles-pp.native_queued_spin_lock_slowpath
> > > 0.29 ± 6% +3.5 3.81 ± 6% perf-profile.self.cycles-pp.sctp_eat_data
> > > 0.00 +7.8 7.76 ± 6% perf-profile.self.cycles-pp.__sk_mem_reduce_allocated
From the perf data, we can see __sk_mem_reduce_allocated() is the one
using CPU the most more than before, and mem_cgroup APIs are also
called in this function. It means the mem cgroup must be enabled in
the test env, which may explain why I couldn't reproduce it.
The Commit 4890b686f4 ("net: keep sk->sk_forward_alloc as small as
possible") uses sk_mem_reclaim(checking reclaimable >= PAGE_SIZE) to
reclaim the memory, which is *more frequent* to call
__sk_mem_reduce_allocated() than before (checking reclaimable >=
SK_RECLAIM_THRESHOLD). It might be cheap when
mem_cgroup_sockets_enabled is false, but I'm not sure if it's still
cheap when mem_cgroup_sockets_enabled is true.
I think SCTP netperf could trigger this, as the CPU is the bottleneck
for SCTP netperf testing, which is more sensitive to the extra
function calls than TCP.
Can we re-run this testing without mem cgroup enabled?
Thanks.
next prev parent reply other threads:[~2022-06-23 22:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-19 15:04 kernel test robot
2022-06-23 0:28 ` Jakub Kicinski
2022-06-23 3:08 ` Xin Long
2022-06-23 22:50 ` Xin Long [this message]
2022-06-24 1:57 ` Jakub Kicinski
2022-06-24 4:13 ` Eric Dumazet
2022-06-24 4:22 ` Eric Dumazet
2022-06-24 5:13 ` Feng Tang
2022-06-24 5:45 ` Eric Dumazet
2022-06-24 6:00 ` Feng Tang
2022-06-24 6:07 ` Eric Dumazet
2022-06-24 6:34 ` Shakeel Butt
2022-06-24 7:06 ` Feng Tang
2022-06-24 14:43 ` Shakeel Butt
2022-06-25 2:36 ` Feng Tang
2022-06-27 2:38 ` Feng Tang
2022-06-27 8:46 ` Eric Dumazet
2022-06-27 12:34 ` Feng Tang
2022-06-27 14:07 ` Eric Dumazet
2022-06-27 14:48 ` Feng Tang
2022-06-27 16:25 ` Eric Dumazet
2022-06-27 16:48 ` Shakeel Butt
2022-06-27 17:05 ` Eric Dumazet
2022-06-28 1:46 ` Roman Gushchin
2022-06-28 3:49 ` Feng Tang
2022-07-01 15:47 ` Shakeel Butt
2022-07-03 10:43 ` Feng Tang
2022-07-03 22:55 ` Roman Gushchin
2022-07-05 5:03 ` Feng Tang
2022-08-16 5:52 ` Oliver Sang
2022-08-16 15:55 ` Shakeel Butt
2022-06-27 14:52 ` Shakeel Butt
2022-06-27 14:56 ` Eric Dumazet
2022-06-27 15:12 ` Feng Tang
2022-06-27 16:25 ` 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=CADvbK_eQUmb942vC+bG+NRzM1ki1LiCydEDR1AezZ35Jvsdfnw@mail.gmail.com \
--to=lucien.xin@gmail.com \
--cc=edumazet@google.com \
--cc=feng.tang@intel.com \
--cc=fengwei.yin@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lkp@lists.01.org \
--cc=marcelo.leitner@gmail.com \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oliver.sang@intel.com \
--cc=shakeelb@google.com \
--cc=soheil@google.com \
--cc=ying.huang@intel.com \
--cc=yinxu@redhat.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