From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next] neigh: reorder struct neighbour fields
Date: Tue, 12 Oct 2010 00:02:47 +0200 [thread overview]
Message-ID: <1286834567.30423.102.camel@edumazet-laptop> (raw)
In-Reply-To: <20101011.130128.245392712.davem@davemloft.net>
Here is the followup patch.
Thanks !
[PATCH net-next] neigh: reorder struct neighbour fields
(refcnt) and (ha_lock, ha, dev, output, ops, primary_key) should be
placed on a separate cache lines.
refcnt can be often written, while other fields are mostly read.
This gave me good result on stress test :
before:
real 0m45.570s
user 0m15.525s
sys 9m56.669s
After:
real 0m41.841s
user 0m15.261s
sys 8m45.949s
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
include/net/neighbour.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index f04e7a2..822802a 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -94,7 +94,6 @@ struct neighbour {
struct neighbour __rcu *next;
struct neigh_table *tbl;
struct neigh_parms *parms;
- struct net_device *dev;
unsigned long used;
unsigned long confirmed;
unsigned long updated;
@@ -103,16 +102,17 @@ struct neighbour {
__u8 type;
__u8 dead;
atomic_t refcnt;
+ struct sk_buff_head arp_queue;
+ struct timer_list timer;
atomic_t probes;
rwlock_t lock;
seqlock_t ha_lock;
unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))];
struct hh_cache *hh;
int (*output)(struct sk_buff *skb);
- struct sk_buff_head arp_queue;
- struct timer_list timer;
const struct neigh_ops *ops;
struct rcu_head rcu;
+ struct net_device *dev;
u8 primary_key[0];
};
next prev parent reply other threads:[~2010-10-11 22:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 12:53 [PATCH net-next] neigh: speedup neigh_hh_init() Eric Dumazet
2010-10-07 20:44 ` [PATCH net-next] neigh: speedup neigh_resolve_output() Eric Dumazet
2010-10-11 19:16 ` David Miller
2010-10-11 19:46 ` Eric Dumazet
2010-10-11 20:01 ` David Miller
2010-10-11 22:02 ` Eric Dumazet [this message]
2010-10-11 22:20 ` [PATCH net-next] neigh: reorder struct neighbour fields Eric Dumazet
2010-10-11 23:09 ` David Miller
2010-10-11 16:18 ` [PATCH net-next] neigh: speedup neigh_hh_init() 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=1286834567.30423.102.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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