From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org
Cc: davem@davemloft.net,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
Vlad Yasevich <vyasevich@gmail.com>,
daniel@iogearbox.net
Subject: [PATCHv2 net 1/5] sctp: move sent_count to the memory hole in sctp_chunk
Date: Wed, 28 Sep 2016 18:46:28 +0800 [thread overview]
Message-ID: <03a642a76d02e8536404aa27561c44e348f3e3a0.1475059350.git.lucien.xin@gmail.com> (raw)
In-Reply-To: <cover.1475059350.git.lucien.xin@gmail.com>
In-Reply-To: <cover.1475059350.git.lucien.xin@gmail.com>
Now pahole sctp_chunk, it has 2 memory holes:
struct sctp_chunk {
struct list_head list;
atomic_t refcnt;
/* XXX 4 bytes hole, try to pack */
...
long unsigned int prsctp_param;
int sent_count;
/* XXX 4 bytes hole, try to pack */
This patch is to move up sent_count to fill the 1st one and eliminate
the 2nd one.
It's not just another struct compaction, it also fixes the "netperf-
Throughput_Mbps -37.2% regression" issue when overloading the CPU.
Fixes: a6c2f792873a ("sctp: implement prsctp TTL policy")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
include/net/sctp/structs.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ce93c4b..4f097f5 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -554,6 +554,9 @@ struct sctp_chunk {
atomic_t refcnt;
+ /* How many times this chunk have been sent, for prsctp RTX policy */
+ int sent_count;
+
/* This is our link to the per-transport transmitted list. */
struct list_head transmitted_list;
@@ -610,9 +613,6 @@ struct sctp_chunk {
*/
unsigned long prsctp_param;
- /* How many times this chunk have been sent, for prsctp RTX policy */
- int sent_count;
-
/* Which association does this belong to? */
struct sctp_association *asoc;
--
2.1.0
next prev parent reply other threads:[~2016-09-28 10:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 10:46 [PATCHv2 net 0/5] sctp: some fixes of prsctp polices Xin Long
2016-09-28 10:46 ` Xin Long [this message]
2016-09-28 10:46 ` [PATCHv2 net 2/5] sctp: reuse sent_count to avoid retransmitted chunks for RTT measurements Xin Long
2016-09-28 10:46 ` [PATCHv2 net 3/5] sctp: remove prsctp_param from sctp_chunk Xin Long
2016-09-28 10:46 ` [PATCHv2 net 4/5] sctp: change to check peer prsctp_capable when using prsctp polices Xin Long
2016-09-28 10:46 ` [PATCHv2 net 5/5] sctp: remove the old ttl expires policy Xin Long
2016-09-28 11:22 ` [PATCHv2 net 0/5] sctp: some fixes of prsctp polices Marcelo Ricardo Leitner
2016-09-28 12:13 ` David Miller
2016-09-28 12:35 ` Xin Long
2016-09-28 15:17 ` David Miller
2016-09-28 15:44 ` marcelo.leitner
2016-09-28 16:29 ` Xin Long
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=03a642a76d02e8536404aa27561c44e348f3e3a0.1475059350.git.lucien.xin@gmail.com \
--to=lucien.xin@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vyasevich@gmail.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).