From: Jesper Dangaard Brouer <brouer@redhat.com>
To: "liujian (CE)" <liujian56@huawei.com>
Cc: Michal Kubecek <mkubecek@suse.cz>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Florian Westphal <fw@strlen.de>,
brouer@redhat.com
Subject: Re: [RFC PATCH] net: frag limit checks need to use percpu_counter_compare
Date: Fri, 1 Sep 2017 09:16:41 +0200 [thread overview]
Message-ID: <20170901091641.4c62af06@redhat.com> (raw)
In-Reply-To: <4F88C5DDA1E80143B232E89585ACE27D018F6A9B@DGGEMA502-MBX.china.huawei.com>
On Fri, 1 Sep 2017 02:25:32 +0000 "liujian (CE)" <liujian56@huawei.com> wrote:
> > -----Original Message-----
> > From: Michal Kubecek [mailto:mkubecek@suse.cz]
> > Sent: Friday, September 01, 2017 12:24 AM
> > To: Jesper Dangaard Brouer
> > Cc: liujian (CE); netdev@vger.kernel.org; Florian Westphal
> > Subject: Re: [RFC PATCH] net: frag limit checks need to use
> > percpu_counter_compare
> >
> > On Thu, Aug 31, 2017 at 12:20:19PM +0200, Jesper Dangaard Brouer wrote:
> > > To: Liujian can you please test this patch?
> > > I want to understand if using __percpu_counter_compare() solves the
> > > problem correctness wise (even-though this will be slower than using
> > > a simple atomic_t on your big system).
>
> I have test the patch, it can work.
Thanks for confirming this.
> 1. make sure frag_mem_limit reach to thresh
> ===>FRAG: inuse 0 memory 0 frag_mem_limit 5386864
> 2. change NIC rx irq's affinity to a fixed CPU
If you pin the NIC RX queue to a single CPU, then the error issue
basically cannot happen. Different CPU need to have a chance to "own"
part of the percpu_counter. I guess default setup with irqbalance
could eventually screw the percpu_counter enough given enough CPUs, or
a network load with enough different L2-headers to high different RX
queues.
> 3. iperf -u -c 9.83.1.41 -l 10000 -i 1 -t 1000 -P 10 -b 20M
> And check /proc/net/snmp, there are no ReasmFails.
My quick check command is:
nstat > /dev/null && sleep 1 && nstat && grep FRAG /proc/net/sockstat
> And I think it is a better way that adding some counter sync points
> as you said.
I've discussed this offlist with Florian, while it is doable, we are
adding too much complexity for something that can be solved much
simpler with an atomic_t (as before my patch). Thus, I'm now looking
at reverting my original change (commit 6d7b857d541e ("net: use
lib/percpu_counter API for fragmentation mem accounting")).
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2017-09-01 7:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 10:20 [RFC PATCH] net: frag limit checks need to use percpu_counter_compare Jesper Dangaard Brouer
2017-08-31 15:58 ` Stephen Hemminger
2017-08-31 16:23 ` Michal Kubecek
2017-09-01 2:25 ` liujian (CE)
2017-09-01 7:16 ` Jesper Dangaard Brouer [this message]
2017-09-01 7:41 ` Jesper Dangaard Brouer
2017-09-01 8:10 ` Michal Kubecek
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=20170901091641.4c62af06@redhat.com \
--to=brouer@redhat.com \
--cc=fw@strlen.de \
--cc=liujian56@huawei.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).