From: Florian Westphal <fw@strlen.de>
To: "Yigal Reiss (yreiss)" <yreiss@cisco.com>
Cc: "netfilter-devel@vger.kernel.org" <netfilter-devel@vger.kernel.org>
Subject: Re: batch netlink messages - performance improvement
Date: Fri, 26 Feb 2016 11:04:52 +0100 [thread overview]
Message-ID: <20160226100452.GA2148@breakpoint.cc> (raw)
In-Reply-To: <dab4ca588cd243b0b36b7b0283bd50dd@XCH-RCD-014.cisco.com>
Yigal Reiss (yreiss) <yreiss@cisco.com> wrote:
> So I tried batching the unicast netlink messages (carrying the packets) from kernel to user space. I do that by calling sk->sk_data_ready(sk); (in __netlink_sendskb() in af_netlink.c) only every [N] packets. This seems to contribute similar performance improvements as the batch verdict.
Uh?
That makes no sense to me. Why and how does that help?
Can you share numbers or example program that exhibits
this behaviour?
I'd expect that in most cases (in non-idle case) that
sock_def_readable usually doesn't do anything (skwq_has_sleeper should
be false).
For nfqueue best receipe seems to be
recvmmsg + batch number of vectors read + NFQA_CFG_F_GSO.
> If this suggestion makes sense, how would you suggest proceed with this idea?
I'd first like to understand what is so expensive in sock_def_readable
that this helps in first place.
next prev parent reply other threads:[~2016-02-26 10:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 19:43 batch netlink messages - performance improvement Yigal Reiss (yreiss)
2016-02-26 10:04 ` Florian Westphal [this message]
2016-02-29 14:37 ` Yigal Reiss (yreiss)
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=20160226100452.GA2148@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=yreiss@cisco.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).