RE: [PATCH v12 06/17] Use callback to deal with skb_release_data() specially.

2010-10-11 Thread Xin, Xiaohui
-Original Message-
From: David Miller [mailto:da...@davemloft.net]
Sent: Friday, October 01, 2010 3:15 PM
To: Xin, Xiaohui
Cc: net...@vger.kernel.org; kvm@vger.kernel.org; linux-ker...@vger.kernel.org;
m...@redhat.com; mi...@elte.hu; herb...@gondor.apana.org.au; 
jd...@linux.intel.com
Subject: Re: [PATCH v12 06/17] Use callback to deal with skb_release_data() 
specially.

From: xiaohui@intel.com
Date: Thu, 30 Sep 2010 22:04:23 +0800

 @@ -197,10 +197,11 @@ struct skb_shared_info {
  union skb_shared_tx tx_flags;
  struct sk_buff  *frag_list;
  struct skb_shared_hwtstamps hwtstamps;
 -skb_frag_t  frags[MAX_SKB_FRAGS];
  /* Intermediate layers must ensure that destructor_arg
   * remains valid until skb destructor */
  void *  destructor_arg;
 +
 +skb_frag_t  frags[MAX_SKB_FRAGS];
  };

  /* The structure is for a skb which pages may point to

Why are you moving frags[] to the end like this?

That's to avoid the new cache miss caused by using destructor_arg in data path
like skb_release_data().
That's based on the comment from Eric Dumazet on v7 patches.

Thanks
Xiaohui
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v12 06/17] Use callback to deal with skb_release_data() specially.

2010-10-11 Thread David Miller
From: Xin, Xiaohui xiaohui@intel.com
Date: Mon, 11 Oct 2010 15:06:05 +0800

 That's to avoid the new cache miss caused by using destructor_arg in data path
 like skb_release_data().
 That's based on the comment from Eric Dumazet on v7 patches.

Thanks for the explanation.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v12 06/17] Use callback to deal with skb_release_data() specially.

2010-10-11 Thread Eric Dumazet
Le lundi 11 octobre 2010 à 08:27 -0700, David Miller a écrit :
 From: Xin, Xiaohui xiaohui@intel.com
 Date: Mon, 11 Oct 2010 15:06:05 +0800
 
  That's to avoid the new cache miss caused by using destructor_arg in data 
  path
  like skb_release_data().
  That's based on the comment from Eric Dumazet on v7 patches.
 
 Thanks for the explanation.

Anyway, frags[] must be the last field of struct skb_shared_info
since commit fed66381 (net: pskb_expand_head() optimization)

It seems Xin worked on a quite old tree.



--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v12 06/17] Use callback to deal with skb_release_data() specially.

2010-10-11 Thread Xin, Xiaohui
-Original Message-
From: Eric Dumazet [mailto:eric.duma...@gmail.com]
Sent: Monday, October 11, 2010 11:42 PM
To: David Miller
Cc: Xin, Xiaohui; net...@vger.kernel.org; kvm@vger.kernel.org;
linux-ker...@vger.kernel.org; m...@redhat.com; mi...@elte.hu;
herb...@gondor.apana.org.au; jd...@linux.intel.com
Subject: Re: [PATCH v12 06/17] Use callback to deal with skb_release_data() 
specially.

Le lundi 11 octobre 2010 à 08:27 -0700, David Miller a écrit :
 From: Xin, Xiaohui xiaohui@intel.com
 Date: Mon, 11 Oct 2010 15:06:05 +0800

  That's to avoid the new cache miss caused by using destructor_arg in data 
  path
  like skb_release_data().
  That's based on the comment from Eric Dumazet on v7 patches.

 Thanks for the explanation.

Anyway, frags[] must be the last field of struct skb_shared_info
since commit fed66381 (net: pskb_expand_head() optimization)

It seems Xin worked on a quite old tree.


I will rebase soon.

Thanks
Xiaohui
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v12 06/17] Use callback to deal with skb_release_data() specially.

2010-10-01 Thread David Miller
From: xiaohui@intel.com
Date: Thu, 30 Sep 2010 22:04:23 +0800

 @@ -197,10 +197,11 @@ struct skb_shared_info {
   union skb_shared_tx tx_flags;
   struct sk_buff  *frag_list;
   struct skb_shared_hwtstamps hwtstamps;
 - skb_frag_t  frags[MAX_SKB_FRAGS];
   /* Intermediate layers must ensure that destructor_arg
* remains valid until skb destructor */
   void *  destructor_arg;
 +
 + skb_frag_t  frags[MAX_SKB_FRAGS];
  };
  
  /* The structure is for a skb which pages may point to

Why are you moving frags[] to the end like this?
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html