sctp: move sent_count to the memory hole in sctp_chunk
authorXin Long <lucien.xin@gmail.com>
Wed, 28 Sep 2016 18:37:26 +0000 (02:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Sep 2016 06:07:05 +0000 (02:07 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h

index ce93c4b10d2620a3ac4c9efe39a86e5d231b51c2..4f097f538fff04121bd04d7cdcfc52ea2e526bf6 100644 (file)
@@ -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;
 
This page took 0.025102 seconds and 5 git commands to generate.