[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1726E33B@AcuExch.aculab.com>
Date: Tue, 8 Jul 2014 10:47:35 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Daniel Borkmann' <dborkman@...hat.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"geirola@...il.com" <geirola@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-sctp@...r.kernel.org" <linux-sctp@...r.kernel.org>
Subject: RE: [PATCH net-next 2/5] net: sctp: implement rfc6458, 5.3.4.
SCTP_SNDINFO cmsg support
From: Daniel Borkmann
> On 07/07/2014 10:46 AM, David Laight wrote:
> ...
> >> @@ -1858,8 +1870,8 @@ static int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
> >> pr_debug("%s: we have a valid association\n", __func__);
> >>
> >> if (!sinfo) {
> >> - /* If the user didn't specify SNDRCVINFO, make up one with
> >> - * some defaults.
> >> + /* If the user didn't specify SNDINFO/SNDRCVINFO, make up
> >> + * one with some defaults.
> >> */
> >> memset(&default_sinfo, 0, sizeof(default_sinfo));
> >
> > Is this memset() needed?
>
> This patch is not changing it, so feel free to propose one. If you zero
> out the remaining fields only used for rx, you should be able to drop it,
> but I guess all these micro-optimizations won't be that visible when we
> have much more fundamental things to solve in SCTP stack's performance.
Yes, I'm not even sure the protocol itself was designed to be code or
network bandwidth efficient.
The Linux implementation certainly doesn't give the impression of being
written for code speed. Never mind worries about cache line occupancy.
I suspect the memset/memcpy cost more than the cache line alignment issues
and gains from annotating with un/likely.
The largest gain probably comes from killing the 'command queue'.
Some actions do need deferring - for instance sending SACK should be deferred
until all the data chunks have been processed.
Once that is gone, other things might be more obvious.
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists