From: Weiping Pan <panweiping3@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: wpan@redhat.com, netdev@vger.kernel.org, brutus@google.com
Subject: Re: [RFC PATCH net-next 0/3 V4] net-tcp: TCP/IP stack bypass for loopback connections
Date: Wed, 12 Dec 2012 22:13:02 +0800 [thread overview]
Message-ID: <50C890EE.7070704@gmail.com> (raw)
In-Reply-To: <20121210.160230.1883556145617090938.davem@davemloft.net>
On 12/11/2012 05:02 AM, David Miller wrote:
> From: Weiping Pan<wpan@redhat.com>
> Date: Wed, 5 Dec 2012 10:54:16 +0800
>
>> Friends VS AF__UNIX
>> Their call path are almost the same, but AF_UNIX uses its own send/recv codes
>> with proper locks,
>> so AF_UNIX's performance is much better than Friends.
Sorry, this statement is not correct.
In TCP_STREAM case, if the message size if 16384, then AF_UNIX is much
better than Friends.
If the message size is smaller, then Friends shows equal performance
with AF_UNIX.
In TCP_RR, Friends shows equal performance with AF_UNIX, too.
> While I understand the other portions of your analysis, this one
> mystifies me.
>
> In both cases, the sender has to queue the SKB onto the receiver's
> queue. And in both cases, the sender takes the lock on that queue.
>
> So the locking contention really ought to be similar if not identical.
>
> The only difference is that AF_UNIX takes the unix_sk()->lock of the
> remote socket around these operations.
>
> If that is enough of a synchronizer to "fix" the contention or reduce
> it, then this would be very easy to test by adding a friend lock to
> tcp_sk().
I make some experiments to reduce the use of lock,
some performance results will be followed up.
thanks
Weiping Pan
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-12-12 14:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 10:19 Fwd: Re: [PATCH v3] net-tcp: TCP/IP stack bypass for loopback connections Weiping Pan
2012-10-18 12:23 ` Bruce Curtis
2012-12-05 2:54 ` [RFC PATCH net-next 0/3 V4] " Weiping Pan
2012-12-05 2:54 ` [PATCH 1/3] Bruce's orignal tcp friend V3 Weiping Pan
2012-12-05 2:54 ` [PATCH 2/3] fix panic in tcp_close() Weiping Pan
2012-12-05 2:54 ` [PATCH 3/3] delete request_sock->friend Weiping Pan
2012-12-10 21:02 ` [RFC PATCH net-next 0/3 V4] net-tcp: TCP/IP stack bypass for loopback connections David Miller
2012-12-12 14:13 ` Weiping Pan [this message]
[not found] ` <117a10f9575d95d6a9ea4602ea7376e2b6d5ccd1.1355320533.git.wpan@redhat.com>
2012-12-12 14:29 ` [RFC PATCH net-next 4/4 V4] try to fix performance regression Weiping Pan
2012-12-12 14:57 ` David Laight
2012-12-13 14:05 ` Weiping Pan
2012-12-13 18:25 ` Rick Jones
2012-12-14 5:53 ` Weiping Pan
2012-12-12 16:25 ` Eric Dumazet
2012-12-13 14:09 ` Weiping Pan
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=50C890EE.7070704@gmail.com \
--to=panweiping3@gmail.com \
--cc=brutus@google.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=wpan@redhat.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).