Skip to content

Commit

Permalink
sctp: move sent_count to the memory hole in sctp_chunk
Browse files Browse the repository at this point in the history
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: a6c2f79 ("sctp: implement prsctp TTL policy")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Xin Long authored and David S. Miller committed Sep 30, 2016
1 parent 1b0ff89 commit 73dca12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 73dca12

Please sign in to comment.