• Eric Dumazet's avatar
    net: speed up skb_rbtree_purge() · 7c90584c
    Eric Dumazet authored
    As measured in my prior patch ("sch_netem: faster rb tree removal"),
    rbtree_postorder_for_each_entry_safe() is nice looking but much slower
    than using rb_next() directly, except when tree is small enough
    to fit in CPU caches (then the cost is the same)
    
    Also note that there is not even an increase of text size :
    $ size net/core/skbuff.o.before net/core/skbuff.o
       text	   data	    bss	    dec	    hex	filename
      40711	   1298	      0	  42009	   a419	net/core/skbuff.o.before
      40711	   1298	      0	  42009	   a419	net/core/skbuff.o
    
    From: Eric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7c90584c
skbuff.c 133 KB