1. 11 3月, 2013 1 次提交
  2. 10 3月, 2013 1 次提交
  3. 09 3月, 2013 1 次提交
  4. 08 3月, 2013 2 次提交
  5. 01 3月, 2013 1 次提交
    • E
      tcp: avoid wakeups for pure ACK · 79ffef1f
      Eric Dumazet 提交于
      TCP prequeue mechanism purpose is to let incoming packets
      being processed by the thread currently blocked in tcp_recvmsg(),
      instead of behalf of the softirq handler, to better adapt flow
      control on receiver host capacity to schedule the consumer.
      
      But in typical request/answer workloads, we send request, then
      block to receive the answer. And before the actual answer, TCP
      stack receives the ACK packets acknowledging the request.
      
      Processing pure ACK on behalf of the thread blocked in tcp_recvmsg()
      is a waste of resources, as thread has to immediately sleep again
      because it got no payload.
      
      This patch avoids the extra context switches and scheduler overhead.
      
      Before patch :
      
      a:~# echo 0 >/proc/sys/net/ipv4/tcp_low_latency
      a:~# perf stat ./super_netperf 300 -t TCP_RR -l 10 -H 7.7.7.84 -- -r 8k,8k
      231676
      
       Performance counter stats for './super_netperf 300 -t TCP_RR -l 10 -H 7.7.7.84 -- -r 8k,8k':
      
           116251.501765 task-clock                #   11.369 CPUs utilized
               5,025,463 context-switches          #    0.043 M/sec
               1,074,511 CPU-migrations            #    0.009 M/sec
                 216,923 page-faults               #    0.002 M/sec
         311,636,972,396 cycles                    #    2.681 GHz
         260,507,138,069 stalled-cycles-frontend   #   83.59% frontend cycles idle
         155,590,092,840 stalled-cycles-backend    #   49.93% backend  cycles idle
         100,101,255,411 instructions              #    0.32  insns per cycle
                                                   #    2.60  stalled cycles per insn
          16,535,930,999 branches                  #  142.243 M/sec
             646,483,591 branch-misses             #    3.91% of all branches
      
            10.225482774 seconds time elapsed
      
      After patch :
      
      a:~# echo 0 >/proc/sys/net/ipv4/tcp_low_latency
      a:~# perf stat ./super_netperf 300 -t TCP_RR -l 10 -H 7.7.7.84 -- -r 8k,8k
      233297
      
       Performance counter stats for './super_netperf 300 -t TCP_RR -l 10 -H 7.7.7.84 -- -r 8k,8k':
      
            91084.870855 task-clock                #    8.887 CPUs utilized
               2,485,916 context-switches          #    0.027 M/sec
                 815,520 CPU-migrations            #    0.009 M/sec
                 216,932 page-faults               #    0.002 M/sec
         245,195,022,629 cycles                    #    2.692 GHz
         202,635,777,041 stalled-cycles-frontend   #   82.64% frontend cycles idle
         124,280,372,407 stalled-cycles-backend    #   50.69% backend  cycles idle
          83,457,289,618 instructions              #    0.34  insns per cycle
                                                   #    2.43  stalled cycles per insn
          13,431,472,361 branches                  #  147.461 M/sec
             504,470,665 branch-misses             #    3.76% of all branches
      
            10.249594448 seconds time elapsed
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79ffef1f
  6. 28 2月, 2013 2 次提交
    • A
      9p: turn fid->dlist into hlist · c4d30967
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c4d30967
    • S
      hlist: drop the node parameter from iterators · b67bfe0d
      Sasha Levin 提交于
      I'm not sure why, but the hlist for each entry iterators were conceived
      
              list_for_each_entry(pos, head, member)
      
      The hlist ones were greedy and wanted an extra parameter:
      
              hlist_for_each_entry(tpos, pos, head, member)
      
      Why did they need an extra pos parameter? I'm not quite sure. Not only
      they don't really need it, it also prevents the iterator from looking
      exactly like the list iterator, which is unfortunate.
      
      Besides the semantic patch, there was some manual work required:
      
       - Fix up the actual hlist iterators in linux/list.h
       - Fix up the declaration of other iterators based on the hlist ones.
       - A very small amount of places were using the 'node' parameter, this
       was modified to use 'obj->member' instead.
       - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
       properly, so those had to be fixed up manually.
      
      The semantic patch which is mostly the work of Peter Senna Tschudin is here:
      
      @@
      iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
      
      type T;
      expression a,c,d,e;
      identifier b;
      statement S;
      @@
      
      -T b;
          <+... when != b
      (
      hlist_for_each_entry(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue(a,
      - b,
      c) S
      |
      hlist_for_each_entry_from(a,
      - b,
      c) S
      |
      hlist_for_each_entry_rcu(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_rcu_bh(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue_rcu_bh(a,
      - b,
      c) S
      |
      for_each_busy_worker(a, c,
      - b,
      d) S
      |
      ax25_uid_for_each(a,
      - b,
      c) S
      |
      ax25_for_each(a,
      - b,
      c) S
      |
      inet_bind_bucket_for_each(a,
      - b,
      c) S
      |
      sctp_for_each_hentry(a,
      - b,
      c) S
      |
      sk_for_each(a,
      - b,
      c) S
      |
      sk_for_each_rcu(a,
      - b,
      c) S
      |
      sk_for_each_from
      -(a, b)
      +(a)
      S
      + sk_for_each_from(a) S
      |
      sk_for_each_safe(a,
      - b,
      c, d) S
      |
      sk_for_each_bound(a,
      - b,
      c) S
      |
      hlist_for_each_entry_safe(a,
      - b,
      c, d, e) S
      |
      hlist_for_each_entry_continue_rcu(a,
      - b,
      c) S
      |
      nr_neigh_for_each(a,
      - b,
      c) S
      |
      nr_neigh_for_each_safe(a,
      - b,
      c, d) S
      |
      nr_node_for_each(a,
      - b,
      c) S
      |
      nr_node_for_each_safe(a,
      - b,
      c, d) S
      |
      - for_each_gfn_sp(a, c, d, b) S
      + for_each_gfn_sp(a, c, d) S
      |
      - for_each_gfn_indirect_valid_sp(a, c, d, b) S
      + for_each_gfn_indirect_valid_sp(a, c, d) S
      |
      for_each_host(a,
      - b,
      c) S
      |
      for_each_host_safe(a,
      - b,
      c, d) S
      |
      for_each_mesh_entry(a,
      - b,
      c, d) S
      )
          ...+>
      
      [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
      [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
      [akpm@linux-foundation.org: checkpatch fixes]
      [akpm@linux-foundation.org: fix warnings]
      [akpm@linux-foudnation.org: redo intrusive kvm changes]
      Tested-by: NPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b67bfe0d
  7. 26 2月, 2013 1 次提交
  8. 23 2月, 2013 2 次提交
  9. 22 2月, 2013 1 次提交
  10. 21 2月, 2013 1 次提交
  11. 19 2月, 2013 2 次提交
    • P
      netfilter: nf_ct_helper: better logging for dropped packets · b20ab9cc
      Pablo Neira Ayuso 提交于
      Connection tracking helpers have to drop packets under exceptional
      situations. Currently, the user gets the following logging message
      in case that happens:
      
      	nf_ct_%s: dropping packet ...
      
      However, depending on the helper, there are different reasons why a
      packet can be dropped.
      
      This patch modifies the existing code to provide more specific
      error message in the scope of each helper to help users to debug
      the reason why the packet has been dropped, ie:
      
      	nf_ct_%s: dropping packet: reason ...
      
      Thanks to Joe Perches for many formatting suggestions.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      b20ab9cc
    • Y
      net: fix a compile error when SOCK_REFCNT_DEBUG is enabled · dec34fb0
      Ying Xue 提交于
      When SOCK_REFCNT_DEBUG is enabled, below build error is met:
      
      kernel/sysctl_binary.o: In function `sk_refcnt_debug_release':
      include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
      kernel/sysctl.o:include/net/sock.h:1025: first defined here
      kernel/audit.o: In function `sk_refcnt_debug_release':
      include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
      kernel/sysctl.o:include/net/sock.h:1025: first defined here
      make[1]: *** [kernel/built-in.o] Error 1
      make: *** [kernel] Error 2
      
      So we decide to make sk_refcnt_debug_release static to eliminate
      the error.
      Signed-off-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dec34fb0
  12. 15 2月, 2013 10 次提交
  13. 13 2月, 2013 6 次提交
  14. 12 2月, 2013 9 次提交
    • E
      9p: Modify struct 9p_fid to use a kuid_t not a uid_t · b4642556
      Eric W. Biederman 提交于
      Change struct 9p_fid and it's associated functions to
      use kuid_t's instead of uid_t.
      
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Ron Minnich <rminnich@gmail.com>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      b4642556
    • E
      9p: Modify the stat structures to use kuid_t and kgid_t · 447c5094
      Eric W. Biederman 提交于
      9p has thre strucrtures that can encode inode stat information.  Modify
      all of those structures to contain kuid_t and kgid_t values.  Modify
      he wire encoders and decoders of those structures to use 'u' and 'g' instead of
      'd' in the format string where uids and gids are present.
      
      This results in all kuid and kgid conversion to and from on the wire values
      being performed by the same code in protocol.c where the client is known
      at the time of the conversion.
      
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Ron Minnich <rminnich@gmail.com>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      447c5094
    • E
      9p: Transmit kuid and kgid values · f791f7c5
      Eric W. Biederman 提交于
      Modify the p9_client_rpc format specifiers of every function that
      directly transmits a uid or a gid from 'd' to 'u' or 'g' as
      appropriate.
      
      Modify those same functions to take kuid_t and kgid_t parameters
      instead of uid_t and gid_t parameters.
      
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Ron Minnich <rminnich@gmail.com>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      f791f7c5
    • S
      mac80211: Fix tx queue handling during scans · 6c17b77b
      Seth Forshee 提交于
      Scans currently work by stopping the netdev tx queues but leaving the
      mac80211 queues active. This stops the flow of incoming packets while
      still allowing mac80211 to transmit nullfunc and probe request frames to
      facilitate scanning. However, the driver may try to wake the mac80211
      queues while in this state, which will also wake the netdev queues.
      
      To prevent this, add a new queue stop reason,
      IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL, to be used when stopping the tx
      queues for off-channel operation. This prevents the netdev queues from
      waking when a driver wakes the mac80211 queues.
      
      This also stops all frames from being transmitted, even those meant to
      be sent off-channel. Add a new tx control flag,
      IEEE80211_TX_CTL_OFFCHAN_TX_OK, which allows frames to be transmitted
      when the queues are stopped only for the off-channel stop reason. Update
      all locations transmitting off-channel frames to use this flag.
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6c17b77b
    • J
      mac80211: remove IEEE80211_HW_SCAN_WHILE_IDLE · f1e3e051
      Johannes Berg 提交于
      There are only a few drivers that use HW scan, and
      all of those don't need a non-idle transition before
      starting the scan -- some don't even care about idle
      at all. Remove the flag and code associated with it.
      
      The only driver that really actually needed this is
      wl1251 and it can just do it itself in the hw_scan
      callback -- implement that.
      Acked-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f1e3e051
    • J
      mac80211: remove dynamic PS driver interface · 09b85568
      Johannes Berg 提交于
      The functions were added for some sort of Bluetooth
      coexistence, but aren't used, so remove them again.
      Reviewed-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      09b85568
    • J
      mac80211: introduce beacon-only timing data · ef429dad
      Johannes Berg 提交于
      In order to be able to predict the next DTIM TBTT
      in the driver, add the ability to use timing data
      from beacons only with the new hardware flag
      IEEE80211_HW_TIMING_BEACON_ONLY and the BSS info
      value sync_dtim_count which is only valid if the
      timing data came from a beacon. The data can only
      come from a beacon, and if no beacon was received
      before association it is updated later together
      with the DTIM count notification.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ef429dad
    • J
      cfg80211: move TSF into IEs · 8cef2c9d
      Johannes Berg 提交于
      While technically the TSF isn't an IE, it can be
      necessary to distinguish between the TSF from a
      beacon and a probe response, in particular in
      order to know the next DTIM TBTT, as not all APs
      are spec compliant wrt. TSF==0 being a DTIM TBTT
      and thus the DTIM count needs to be taken into
      account as well.
      
      To allow this, move the TSF into the IE struct
      so it can be known whence it came.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8cef2c9d
    • J
      cfg80211: remove scan ies NULL check · 83c7aa1a
      Johannes Berg 提交于
      There's no way scan BSS IEs can be NULL as even
      if the allocation fails the frame is discarded.
      Remove some code checking for this and document
      that it is always non-NULL.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      83c7aa1a