* [PATCH] net: release dst entry while cache-hot for GSO case too
@ 2009-12-10 6:59 Krishna Kumar
2009-12-10 8:21 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Krishna Kumar @ 2009-12-10 6:59 UTC (permalink / raw)
To: davem; +Cc: netdev, eric.dumazet, Krishna Kumar
From: Krishna Kumar <krkumar2@in.ibm.com>
Non-GSO code drops dst entry for performance reasons, but
the same is missing for GSO code. Drop dst while cache-hot
for GSO case too.
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
diff -ruNp org/net/core/dev.c new/net/core/dev.c
--- org/net/core/dev.c 2009-12-10 10:20:39.000000000 +0530
+++ new/net/core/dev.c 2009-12-10 10:21:17.000000000 +0530
@@ -1853,6 +1853,14 @@ gso:
skb->next = nskb->next;
nskb->next = NULL;
+
+ /*
+ * If device doesnt need nskb->dst, release it right now while
+ * its hot in this cpu cache
+ */
+ if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
+ skb_dst_drop(nskb);
+
rc = ops->ndo_start_xmit(nskb, dev);
if (unlikely(rc != NETDEV_TX_OK)) {
if (rc & ~NETDEV_TX_MASK)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] net: release dst entry while cache-hot for GSO case too
2009-12-10 6:59 [PATCH] net: release dst entry while cache-hot for GSO case too Krishna Kumar
@ 2009-12-10 8:21 ` Eric Dumazet
2009-12-23 22:16 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2009-12-10 8:21 UTC (permalink / raw)
To: Krishna Kumar; +Cc: davem, netdev
Le 10/12/2009 07:59, Krishna Kumar a écrit :
> From: Krishna Kumar <krkumar2@in.ibm.com>
>
> Non-GSO code drops dst entry for performance reasons, but
> the same is missing for GSO code. Drop dst while cache-hot
> for GSO case too.
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
> ---
>
> diff -ruNp org/net/core/dev.c new/net/core/dev.c
> --- org/net/core/dev.c 2009-12-10 10:20:39.000000000 +0530
> +++ new/net/core/dev.c 2009-12-10 10:21:17.000000000 +0530
> @@ -1853,6 +1853,14 @@ gso:
>
> skb->next = nskb->next;
> nskb->next = NULL;
> +
> + /*
> + * If device doesnt need nskb->dst, release it right now while
> + * its hot in this cpu cache
> + */
> + if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
> + skb_dst_drop(nskb);
> +
> rc = ops->ndo_start_xmit(nskb, dev);
> if (unlikely(rc != NETDEV_TX_OK)) {
> if (rc & ~NETDEV_TX_MASK)
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] net: release dst entry while cache-hot for GSO case too
2009-12-10 8:21 ` Eric Dumazet
@ 2009-12-23 22:16 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-12-23 22:16 UTC (permalink / raw)
To: eric.dumazet; +Cc: krkumar2, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 10 Dec 2009 09:21:00 +0100
> Le 10/12/2009 07:59, Krishna Kumar a écrit :
>> From: Krishna Kumar <krkumar2@in.ibm.com>
>>
>> Non-GSO code drops dst entry for performance reasons, but
>> the same is missing for GSO code. Drop dst while cache-hot
>> for GSO case too.
>>
>> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
...
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-23 22:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-10 6:59 [PATCH] net: release dst entry while cache-hot for GSO case too Krishna Kumar
2009-12-10 8:21 ` Eric Dumazet
2009-12-23 22:16 ` David Miller
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).