Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=84284d3c1d6372bc9ab496607661d230d9c45de4
Commit:     84284d3c1d6372bc9ab496607661d230d9c45de4
Parent:     e9edda697ed7697f1288d0656570e49c47e204ae
Author:     Jeremy Fitzhardinge <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 12:59:53 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 16:13:36 2007 -0400

    xen-netfront: rearrange netfront structure to separate tx and rx
    
    Keep tx and rx elements separate on different cachelines to prevent
    bouncing.
    
    Signed-off-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]>
    Acked-by: Jeff Garzik <[EMAIL PROTECTED]>
    Cc: Stephen Hemminger <[EMAIL PROTECTED]>
    Cc: Christoph Hellwig <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/xen-netfront.c |   35 +++++++++++++++++------------------
 1 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index f464b82..7fd505c 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -74,22 +74,12 @@ struct netfront_info {
 
        struct napi_struct napi;
 
-       struct xen_netif_tx_front_ring tx;
-       struct xen_netif_rx_front_ring rx;
-
-       spinlock_t   tx_lock;
-       spinlock_t   rx_lock;
-
        unsigned int evtchn;
+       struct xenbus_device *xbdev;
 
-       /* Receive-ring batched refills. */
-#define RX_MIN_TARGET 8
-#define RX_DFL_MIN_TARGET 64
-#define RX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
-       unsigned rx_min_target, rx_max_target, rx_target;
-       struct sk_buff_head rx_batch;
-
-       struct timer_list rx_refill_timer;
+       spinlock_t   tx_lock;
+       struct xen_netif_tx_front_ring tx;
+       int tx_ring_ref;
 
        /*
         * {tx,rx}_skbs store outstanding skbuffs. Free tx_skb entries
@@ -108,14 +98,23 @@ struct netfront_info {
        grant_ref_t grant_tx_ref[NET_TX_RING_SIZE];
        unsigned tx_skb_freelist;
 
+       spinlock_t   rx_lock ____cacheline_aligned_in_smp;
+       struct xen_netif_rx_front_ring rx;
+       int rx_ring_ref;
+
+       /* Receive-ring batched refills. */
+#define RX_MIN_TARGET 8
+#define RX_DFL_MIN_TARGET 64
+#define RX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
+       unsigned rx_min_target, rx_max_target, rx_target;
+       struct sk_buff_head rx_batch;
+
+       struct timer_list rx_refill_timer;
+
        struct sk_buff *rx_skbs[NET_RX_RING_SIZE];
        grant_ref_t gref_rx_head;
        grant_ref_t grant_rx_ref[NET_RX_RING_SIZE];
 
-       struct xenbus_device *xbdev;
-       int tx_ring_ref;
-       int rx_ring_ref;
-
        unsigned long rx_pfn_array[NET_RX_RING_SIZE];
        struct multicall_entry rx_mcl[NET_RX_RING_SIZE+1];
        struct mmu_update rx_mmu[NET_RX_RING_SIZE];
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to