1. 04 11月, 2009 1 次提交
  2. 15 9月, 2009 1 次提交
    • J
      pkt_sched: Fix tx queue selection in tc_modify_qdisc · 926e61b7
      Jarek Poplawski 提交于
      After the recent mq change there is the new select_queue qdisc class
      method used in tc_modify_qdisc, but it works OK only for direct child
      qdiscs of mq qdisc. Grandchildren always get the first tx queue, which
      would give wrong qdisc_root etc. results (e.g. for sch_htb as child of
      sch_prio). This patch fixes it by using parent's dev_queue for such
      grandchildren qdiscs. The select_queue method's return type is changed
      BTW.
      
      With feedback from: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      926e61b7
  3. 10 9月, 2009 1 次提交
    • P
      net_sched: fix estimator lock selection for mq child qdiscs · 23bcf634
      Patrick McHardy 提交于
      When new child qdiscs are attached to the mq qdisc, they are actually
      attached as root qdiscs to the device queues. The lock selection for
      new estimators incorrectly picks the root lock of the existing and
      to be replaced qdisc, which results in a use-after-free once the old
      qdisc has been destroyed.
      
      Mark mq qdisc instances with a new flag and treat qdiscs attached to
      mq as children similar to regular root qdiscs.
      
      Additionally prevent estimators from being attached to the mq qdisc
      itself since it only updates its byte and packet counters during dumps.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23bcf634
  4. 06 9月, 2009 2 次提交
  5. 18 8月, 2009 1 次提交
  6. 07 8月, 2009 1 次提交
    • K
      net: Avoid enqueuing skb for default qdiscs · bbd8a0d3
      Krishna Kumar 提交于
      dev_queue_xmit enqueue's a skb and calls qdisc_run which
      dequeue's the skb and xmits it. In most cases, the skb that
      is enqueue'd is the same one that is dequeue'd (unless the
      queue gets stopped or multiple cpu's write to the same queue
      and ends in a race with qdisc_run). For default qdiscs, we
      can remove the redundant enqueue/dequeue and simply xmit the
      skb since the default qdisc is work-conserving.
      
      The patch uses a new flag - TCQ_F_CAN_BYPASS to identify the
      default fast queue. The controversial part of the patch is
      incrementing qlen when a skb is requeued - this is to avoid
      checks like the second line below:
      
      +  } else if ((q->flags & TCQ_F_CAN_BYPASS) && !qdisc_qlen(q) &&
      >>         !q->gso_skb &&
      +          !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) {
      
      Results of a 2 hour testing for multiple netperf sessions (1,
      2, 4, 8, 12 sessions on a 4 cpu system-X). The BW numbers are
      aggregate Mb/s across iterations tested with this version on
      System-X boxes with Chelsio 10gbps cards:
      
      ----------------------------------
      Size |  ORG BW          NEW BW   |
      ----------------------------------
      128K |  156964          159381   |
      256K |  158650          162042   |
      ----------------------------------
      
      Changes from ver1:
      
      1. Move sch_direct_xmit declaration from sch_generic.h to
         pkt_sched.h
      2. Update qdisc basic statistics for direct xmit path.
      3. Set qlen to zero in qdisc_reset.
      4. Changed some function names to more meaningful ones.
      Signed-off-by: NKrishna Kumar <krkumar2@in.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbd8a0d3
  7. 20 3月, 2009 1 次提交
    • E
      net: reorder struct Qdisc for better SMP performance · 5e140dfc
      Eric Dumazet 提交于
      dev_queue_xmit() needs to dirty fields "state", "q", "bstats" and "qstats"
      
      On x86_64 arch, they currently span three cache lines, involving more
      cache line ping pongs than necessary, making longer holding of queue spinlock.
      
      We can reduce this to one cache line, by grouping all read-mostly fields
      at the beginning of structure. (Or should I say, all highly modified fields
      at the end :) )
      
      Before patch :
      
      offsetof(struct Qdisc, state)=0x38
      offsetof(struct Qdisc, q)=0x48
      offsetof(struct Qdisc, bstats)=0x80
      offsetof(struct Qdisc, qstats)=0x90
      sizeof(struct Qdisc)=0xc8
      
      After patch :
      
      offsetof(struct Qdisc, state)=0x80
      offsetof(struct Qdisc, q)=0x88
      offsetof(struct Qdisc, bstats)=0xa0
      offsetof(struct Qdisc, qstats)=0xac
      sizeof(struct Qdisc)=0xc0
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e140dfc
  8. 01 2月, 2009 1 次提交
  9. 14 11月, 2008 1 次提交
  10. 06 11月, 2008 1 次提交
  11. 31 10月, 2008 3 次提交
  12. 07 10月, 2008 1 次提交
  13. 23 9月, 2008 1 次提交
  14. 27 8月, 2008 2 次提交
  15. 21 8月, 2008 1 次提交
  16. 18 8月, 2008 2 次提交
    • D
      pkt_sched: No longer destroy qdiscs from RCU. · 1e0d5a57
      David S. Miller 提交于
      We can now kill them synchronously with all of the
      previous dev_deactivate() cures.
      
      This makes netdev destruction and shutdown saner as
      the qdiscs hold references to the device.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e0d5a57
    • D
      pkt_sched: Add 'deactivated' state. · a9312ae8
      David S. Miller 提交于
      This new state lets dev_deactivate() mark a qdisc as having been
      deactivated.
      
      dev_queue_xmit() and ing_filter() check for this bit and do not
      try to process the qdisc if the bit is set.
      
      dev_deactivate() polls the qdisc after setting the bit, waiting
      for both __QDISC_STATE_RUNNING and __QDISC_STATE_SCHED to clear.
      
      This isn't perfect yet, but subsequent changesets will make it so.
      This part is just one piece of the puzzle.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a9312ae8
  17. 05 8月, 2008 2 次提交
    • J
      net_sched: Add qdisc __NET_XMIT_BYPASS flag · c27f339a
      Jarek Poplawski 提交于
      Patrick McHardy <kaber@trash.net> noticed that it would be nice to
      handle NET_XMIT_BYPASS by NET_XMIT_SUCCESS with an internal qdisc flag
      __NET_XMIT_BYPASS and to remove the mapping from dev_queue_xmit().
      
      David Miller <davem@davemloft.net> spotted a serious bug in the first
      version of this patch.
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c27f339a
    • J
      net_sched: Add qdisc __NET_XMIT_STOLEN flag · 378a2f09
      Jarek Poplawski 提交于
      Patrick McHardy <kaber@trash.net> noticed:
      "The other problem that affects all qdiscs supporting actions is
      TC_ACT_QUEUED/TC_ACT_STOLEN getting mapped to NET_XMIT_SUCCESS
      even though the packet is not queued, corrupting upper qdiscs'
      qlen counters."
      
      and later explained:
      "The reason why it translates it at all seems to be to not increase
      the drops counter. Within a single qdisc this could be avoided by
      other means easily, upper qdiscs would still increase the counter
      when we return anything besides NET_XMIT_SUCCESS though.
      
      This means we need a new NET_XMIT return value to indicate this to
      the upper qdiscs. So I'd suggest to introduce NET_XMIT_STOLEN,
      return that to upper qdiscs and translate it to NET_XMIT_SUCCESS
      in dev_queue_xmit, similar to NET_XMIT_BYPASS."
      
      David Miller <davem@davemloft.net> noticed:
      "Maybe these NET_XMIT_* values being passed around should be a set of
      bits. They could be composed of base meanings, combined with specific
      attributes.
      
      So you could say "NET_XMIT_DROP | __NET_XMIT_NO_DROP_COUNT"
      
      The attributes get masked out by the top-level ->enqueue() caller,
      such that the base meanings are the only thing that make their
      way up into the stack. If it's only about communication within the
      qdisc tree, let's simply code it that way."
      
      This patch is trying to realize these ideas.
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      378a2f09
  18. 03 8月, 2008 1 次提交
  19. 21 7月, 2008 1 次提交
  20. 20 7月, 2008 3 次提交
  21. 19 7月, 2008 1 次提交
  22. 18 7月, 2008 9 次提交
  23. 09 7月, 2008 2 次提交