lkml.org 
[lkml]   [2013]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH net-next 02/13] driver: net: remove unnecessary skb NULL check before calling dev_kfree_skb_irq
    From
    From: Govindarajulu Varadarajan <govindarajulu90@gmail.com>
    Date: Sat, 2 Nov 2013 19:17:43 +0530

    > @@ -1030,10 +1030,8 @@ static void ni65_xmit_intr(struct net_device *dev,int csr0)
    > }
    >
    > #ifdef XMT_VIA_SKB
    > - if(p->tmd_skb[p->tmdlast]) {
    > - dev_kfree_skb_irq(p->tmd_skb[p->tmdlast]);
    > - p->tmd_skb[p->tmdlast] = NULL;
    > - }
    > + dev_kfree_skb_irq(p->tmd_skb[p->tmdlast]);
    > + p->tmd_skb[p->tmdlast] = NULL;
    > #endif

    I absolutely disagree with this kind of change.

    There is a non-trivial cost for NULL'ing out that array entry
    unconditionally. It's a dirtied cache line and this is in the
    fast path of TX SKB reclaim of this driver.

    You've made several changes of this kind.

    And it sort-of shows that the places that do check for NULL,
    are getting something in return for that test, namely avoidance
    of an unnecessary cpu store in the fast path of the driver.

    I'm throwing away this series, sorry.


    \
     
     \ /
      Last update: 2013-11-04 21:21    [W:2.776 / U:0.596 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site