1. 04 Sep, 2016 5 commits
  2. 03 Sep, 2016 16 commits
  3. 02 Sep, 2016 14 commits
  4. 01 Sep, 2016 5 commits
    • Roopa Prabhu's avatar
      rtnetlink: fdb dump: optimize by saving last interface markers · d297653d
      Roopa Prabhu authored
      fdb dumps spanning multiple skb's currently restart from the first
      interface again for every skb. This results in unnecessary
      iterations on the already visited interfaces and their fdb
      entries. In large scale setups, we have seen this to slow
      down fdb dumps considerably. On a system with 30k macs we
      see fdb dumps spanning across more than 300 skbs.
      
      To fix the problem, this patch replaces the existing single fdb
      marker with three markers: netdev hash entries, netdevs and fdb
      index to continue where we left off instead of restarting from the
      first netdev. This is consistent with link dumps.
      
      In the process of fixing the performance issue, this patch also
      re-implements fix done by
      commit 472681d5 ("net: ndo_fdb_dump should report -EMSGSIZE to rtnl_fdb_dump")
      (with an internal fix from Wilson Kok) in the following ways:
      - change ndo_fdb_dump handlers to return error code instead
      of the last fdb index
      - use cb->args strictly for dump frag markers and not error codes.
      This is consistent with other dump functions.
      
      Below results were taken on a system with 1000 netdevs
      and 35085 fdb entries:
      before patch:
      $time bridge fdb show | wc -l
      15065
      
      real    1m11.791s
      user    0m0.070s
      sys 1m8.395s
      
      (existing code does not return all macs)
      
      after patch:
      $time bridge fdb show | wc -l
      35085
      
      real    0m2.017s
      user    0m0.113s
      sys 0m1.942s
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarWilson Kok <wkok@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d297653d
    • Gao Feng's avatar
      rps: flow_dissector: Add the const for the parameter of flow_keys_have_l4 · 66fdd05e
      Gao Feng authored
      Add the const for the parameter of flow_keys_have_l4 for the readability.
      Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66fdd05e
    • David Howells's avatar
      rxrpc: Don't expose skbs to in-kernel users [ver #2] · d001648e
      David Howells authored
      Don't expose skbs to in-kernel users, such as the AFS filesystem, but
      instead provide a notification hook the indicates that a call needs
      attention and another that indicates that there's a new call to be
      collected.
      
      This makes the following possibilities more achievable:
      
       (1) Call refcounting can be made simpler if skbs don't hold refs to calls.
      
       (2) skbs referring to non-data events will be able to be freed much sooner
           rather than being queued for AFS to pick up as rxrpc_kernel_recv_data
           will be able to consult the call state.
      
       (3) We can shortcut the receive phase when a call is remotely aborted
           because we don't have to go through all the packets to get to the one
           cancelling the operation.
      
       (4) It makes it easier to do encryption/decryption directly between AFS's
           buffers and sk_buffs.
      
       (5) Encryption/decryption can more easily be done in the AFS's thread
           contexts - usually that of the userspace process that issued a syscall
           - rather than in one of rxrpc's background threads on a workqueue.
      
       (6) AFS will be able to wait synchronously on a call inside AF_RXRPC.
      
      To make this work, the following interface function has been added:
      
           int rxrpc_kernel_recv_data(
      		struct socket *sock, struct rxrpc_call *call,
      		void *buffer, size_t bufsize, size_t *_offset,
      		bool want_more, u32 *_abort_code);
      
      This is the recvmsg equivalent.  It allows the caller to find out about the
      state of a specific call and to transfer received data into a buffer
      piecemeal.
      
      afs_extract_data() and rxrpc_kernel_recv_data() now do all the extraction
      logic between them.  They don't wait synchronously yet because the socket
      lock needs to be dealt with.
      
      Five interface functions have been removed:
      
      	rxrpc_kernel_is_data_last()
          	rxrpc_kernel_get_abort_code()
          	rxrpc_kernel_get_error_number()
          	rxrpc_kernel_free_skb()
          	rxrpc_kernel_data_consumed()
      
      As a temporary hack, sk_buffs going to an in-kernel call are queued on the
      rxrpc_call struct (->knlrecv_queue) rather than being handed over to the
      in-kernel user.  To process the queue internally, a temporary function,
      temp_deliver_data() has been added.  This will be replaced with common code
      between the rxrpc_recvmsg() path and the kernel_rxrpc_recv_data() path in a
      future patch.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d001648e
    • Bhaktipriya Shridhar's avatar
      net: pegasus: Remove deprecated create_singlethread_workqueue · 95ac3994
      Bhaktipriya Shridhar authored
      The workqueue "pegasus_workqueue" queues a single work item per pegasus
      instance and hence it doesn't require execution ordering. Hence,
      alloc_workqueue has been used to replace the deprecated
      create_singlethread_workqueue instance.
      
      The WQ_MEM_RECLAIM flag has been set to ensure forward progress under
      memory pressure since it's a network driver.
      
      Since there are fixed number of work items, explicit concurrency
      limit is unnecessary here.
      Signed-off-by: default avatarBhaktipriya Shridhar <bhaktipriya96@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarPetko Manolov <petkan@mip-labs.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      95ac3994
    • Bhaktipriya Shridhar's avatar
      bonding: Remove deprecated create_singlethread_workqueue · f9f225eb
      Bhaktipriya Shridhar authored
      alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces
      deprecated create_singlethread_workqueue(). This is the identity
      conversion.
      
      The workqueue "wq" queues multiple work items viz
      &bond->mcast_work, &nnw->work, &bond->mii_work, &bond->arp_work,
      &bond->alb_work, &bond->mii_work, &bond->ad_work, &bond->slave_arr_work
      which require strict execution ordering. Hence, an ordered dedicated
      workqueue has been used.
      
      Since, it is a network driver, WQ_MEM_RECLAIM has been set to
      ensure forward progress under memory pressure.
      Signed-off-by: default avatarBhaktipriya Shridhar <bhaktipriya96@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9f225eb