From: Changli Gao <xiaosuo@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
"David S. Miller" <davem@davemloft.net>, jamal <hadi@cyberus.ca>,
Tom Herbert <therbert@google.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH v4] net: batch skb dequeueing from softnet input_pkt_queue
Date: Thu, 22 Apr 2010 16:03:21 +0800 [thread overview]
Message-ID: <m2n412e6f7f1004220103g140ef833wb41105a491e75ae1@mail.gmail.com> (raw)
In-Reply-To: <1271920877.7895.4757.camel@edumazet-laptop>
On Thu, Apr 22, 2010 at 3:21 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Jamal perf reports show lock contention but also cache line ping pongs.
>
> Yet, you keep a process_queue_len shared by producers and consumer.
>
> Producers want to read it, while consumer decrement it (dirtying its
> cache line) every packet, slowing down the things.
>
>
> The idea of batching is to let the consumer process its local queue with
> no impact to producers.
>
> Please remove it completely, or make the consumer zero it only at the
> end of batch processing.
>
> A cache line miss cost is about 120 cycles. Multiply it by 1 million
> packet per second...
>
OK, I'll remove it, and update the input_pkt_queue only before
process_backlog returns.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
prev parent reply other threads:[~2010-04-22 8:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 5:51 [PATCH v4] net: batch skb dequeueing from softnet input_pkt_queue Changli Gao
2010-04-22 6:18 ` Stephen Hemminger
2010-04-22 6:30 ` Changli Gao
2010-04-22 7:21 ` Eric Dumazet
2010-04-22 8:03 ` Changli Gao [this message]
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=m2n412e6f7f1004220103g140ef833wb41105a491e75ae1@mail.gmail.com \
--to=xiaosuo@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=therbert@google.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;
as well as URLs for NNTP newsgroup(s).