From: Fan Du <fan.du@windriver.com>
To: <vyasevich@gmail.com>, <nhorman@tuxdriver.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: [PATCH net-next] sctp: Pack dst_cookie into 1st cacheline hole for 64bit host
Date: Mon, 5 Aug 2013 17:13:03 +0800 [thread overview]
Message-ID: <1375693983-22824-1-git-send-email-fan.du@windriver.com> (raw)
As dst_cookie is used in fast path sctp_transport_dst_check.
Before:
struct sctp_transport {
struct list_head transports; /* 0 16 */
atomic_t refcnt; /* 16 4 */
__u32 dead:1; /* 20:31 4 */
__u32 rto_pending:1; /* 20:30 4 */
__u32 hb_sent:1; /* 20:29 4 */
__u32 pmtu_pending:1; /* 20:28 4 */
/* XXX 28 bits hole, try to pack */
__u32 sack_generation; /* 24 4 */
/* XXX 4 bytes hole, try to pack */
struct flowi fl; /* 32 64 */
/* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
union sctp_addr ipaddr; /* 96 28 */
After:
struct sctp_transport {
struct list_head transports; /* 0 16 */
atomic_t refcnt; /* 16 4 */
__u32 dead:1; /* 20:31 4 */
__u32 rto_pending:1; /* 20:30 4 */
__u32 hb_sent:1; /* 20:29 4 */
__u32 pmtu_pending:1; /* 20:28 4 */
/* XXX 28 bits hole, try to pack */
__u32 sack_generation; /* 24 4 */
u32 dst_cookie; /* 28 4 */
struct flowi fl; /* 32 64 */
/* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
union sctp_addr ipaddr; /* 96 28 */
Signed-off-by: Fan Du <fan.du@windriver.com>
---
include/net/sctp/structs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index c0f4e29..d9c93a7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -782,6 +782,7 @@ struct sctp_transport {
/* Has this transport moved the ctsn since we last sacked */
__u32 sack_generation;
+ u32 dst_cookie;
struct flowi fl;
@@ -946,7 +947,6 @@ struct sctp_transport {
__u64 hb_nonce;
struct rcu_head rcu;
- u32 dst_cookie;
};
struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *,
--
1.7.9.5
next reply other threads:[~2013-08-05 9:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 9:13 Fan Du [this message]
2013-08-05 11:42 ` [PATCH net-next] sctp: Pack dst_cookie into 1st cacheline hole for 64bit host Neil Horman
2013-08-05 19:21 ` David Miller
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=1375693983-22824-1-git-send-email-fan.du@windriver.com \
--to=fan.du@windriver.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--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).