Skip to content
Snippets Groups Projects
  1. Oct 24, 2011
  2. Oct 23, 2011
  3. Oct 21, 2011
  4. Oct 20, 2011
  5. Oct 19, 2011
  6. Oct 18, 2011
  7. Oct 17, 2011
  8. Oct 16, 2011
  9. Oct 14, 2011
  10. Oct 13, 2011
    • Eric Dumazet's avatar
      net: more accurate skb truesize · 87fb4b7b
      Eric Dumazet authored
      
      skb truesize currently accounts for sk_buff struct and part of skb head.
      kmalloc() roundings are also ignored.
      
      Considering that skb_shared_info is larger than sk_buff, its time to
      take it into account for better memory accounting.
      
      This patch introduces SKB_TRUESIZE(X) macro to centralize various
      assumptions into a single place.
      
      At skb alloc phase, we put skb_shared_info struct at the exact end of
      skb head, to allow a better use of memory (lowering number of
      reallocations), since kmalloc() gives us power-of-two memory blocks.
      
      Unless SLUB/SLUB debug is active, both skb->head and skb_shared_info are
      aligned to cache lines, as before.
      
      Note: This patch might trigger performance regressions because of
      misconfigured protocol stacks, hitting per socket or global memory
      limits that were previously not reached. But its a necessary step for a
      more accurate memory accounting.
      
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      CC: Andi Kleen <ak@linux.intel.com>
      CC: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87fb4b7b
  11. Oct 12, 2011
  12. Oct 11, 2011
  13. Oct 06, 2011
  14. Oct 04, 2011
Loading