1. 14 5月, 2015 8 次提交
  2. 13 5月, 2015 20 次提交
  3. 12 5月, 2015 6 次提交
    • A
      net: Add skb_free_frag to replace use of put_page in freeing skb->head · 181edb2b
      Alexander Duyck 提交于
      This change adds a function called skb_free_frag which is meant to
      compliment the function netdev_alloc_frag.  The general idea is to enable a
      more lightweight version of page freeing since we don't actually need all
      the overhead of a put_page, and we don't quite fit the model of __free_pages.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      181edb2b
    • A
      mm/net: Rename and move page fragment handling from net/ to mm/ · b63ae8ca
      Alexander Duyck 提交于
      This change moves the __alloc_page_frag functionality out of the networking
      stack and into the page allocation portion of mm.  The idea it so help make
      this maintainable by placing it with other page allocation functions.
      
      Since we are moving it from skbuff.c to page_alloc.c I have also renamed
      the basic defines and structure from netdev_alloc_cache to page_frag_cache
      to reflect that this is now part of a different kernel subsystem.
      
      I have also added a simple __free_page_frag function which can handle
      freeing the frags based on the skb->head pointer.  The model for this is
      based off of __free_pages since we don't actually need to deal with all of
      the cases that put_page handles.  I incorporated the virt_to_head_page call
      and compound_order into the function as it actually allows for a signficant
      size reduction by reducing code duplication.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b63ae8ca
    • A
      net: Store virtual address instead of page in netdev_alloc_cache · 0e392508
      Alexander Duyck 提交于
      This change makes it so that we store the virtual address of the page
      in the netdev_alloc_cache instead of the page pointer.  The idea behind
      this is to avoid multiple calls to page_address since the virtual address
      is required for every access, but the page pointer is only needed at
      allocation or reset of the page.
      
      While I was at it I also reordered the netdev_alloc_cache structure a bit
      so that the size is always 16 bytes by dropping size in the case where
      PAGE_SIZE is greater than or equal to 32KB.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e392508
    • A
      net: Use cached copy of pfmemalloc to avoid accessing page · 9451980a
      Alexander Duyck 提交于
      While testing I found that the testing for pfmemalloc in build_skb was
      rather expensive.  I found the issue to be two-fold.  First we have to get
      from the virtual address to the head page and that comes at the cost of
      something like 11 cycles.  Then there is the cost for reading pfmemalloc out
      of the head page which can be cache cold due to the fact that
      put_page_testzero is likely invalidating the cache-line on one or more
      CPUs as the fragments can be shared.
      
      To avoid this extra expense I have added a pfmemalloc member to the
      netdev_alloc_cache.  I then pushed pieces of __alloc_rx_skb into
      __napi_alloc_skb and __netdev_alloc_skb so that I could rewrite them to
      make use of the cached pfmemalloc value.  The result is that my perf traces
      show a reduction from 9.28% overhead to 3.7% for the code covered by
      build_skb, __alloc_rx_skb, and __napi_alloc_skb when performing a test with
      the packet being dropped instead of being handed to napi_gro_receive.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9451980a
    • E
      net: sched: deprecate enqueue_root() · b396cca6
      Eric Dumazet 提交于
      Only left enqueue_root() user is netem, and it looks not necessary :
      
      qdisc_skb_cb(skb)->pkt_len is preserved after one skb_clone()
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b396cca6
    • D
      net_sched: gred: use correct backlog value in WRED mode · 145a42b3
      David Ward 提交于
      In WRED mode, the backlog for a single virtual queue (VQ) should not be
      used to determine queue behavior; instead the backlog is summed across
      all VQs. This sum is currently used when calculating the average queue
      lengths. It also needs to be used when determining if the queue's hard
      limit has been reached, or when reporting each VQ's backlog via netlink.
      q->backlog will only be used if the queue switches out of WRED mode.
      Signed-off-by: NDavid Ward <david.ward@ll.mit.edu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      145a42b3
  4. 11 5月, 2015 6 次提交