1. 14 Dec, 2023 32 commits
  2. 13 Dec, 2023 8 commits
    • David S. Miller's avatar
      Merge branch 'virtio-net-dynamic-coalescing-moderation' · 604ca8ee
      David S. Miller authored
      Heng Qi says:
      
      ====================
      virtio-net: support dynamic coalescing moderation
      
      Now, virtio-net already supports per-queue moderation parameter
      setting. Based on this, we use the linux dimlib to support
      dynamic coalescing moderation for virtio-net.
      
      Due to some scheduling issues, we only support and test the rx dim.
      
      Some test results:
      
      I. Sockperf UDP
      =================================================
      1. Env
      rxq_0 with affinity to cpu_0.
      
      2. Cmd
      client: taskset -c 0 sockperf tp -p 8989 -i $IP -t 10 -m 16B
      server: taskset -c 0 sockperf sr -p 8989
      
      3. Result
      dim off: 1143277.00 rxpps, throughput 17.844 MBps, cpu is 100%.
      dim on:  1124161.00 rxpps, throughput 17.610 MBps, cpu is 83.5%.
      =================================================
      
      II. Redis
      =================================================
      1. Env
      There are 8 rxqs, and rxq_i with affinity to cpu_i.
      
      2. Result
      When all cpus are 100%, ops/sec of memtier_benchmark client is
      dim off:  978437.23
      dim on:  1143638.28
      =================================================
      
      III. Nginx
      =================================================
      1. Env
      There are 8 rxqs and rxq_i with affinity to cpu_i.
      
      2. Result
      When all cpus are 100%, requests/sec of wrk client is
      dim off:  877931.67
      dim on:  1019160.31
      =================================================
      
      IV. Latency of sockperf udp
      =================================================
      1. Rx cmd
      taskset -c 0 sockperf sr -p 8989
      
      2. Tx cmd
      taskset -c 0 sockperf pp -i ${ip} -p 8989 -t 10
      
      After running this cmd 5 times and averaging the results,
      
      3. Result
      dim off: 17.7735 usec
      dim on:  18.0110 usec
      =================================================
      
      Changelog:
      v7->v8:
      - Add select DIMLIB.
      
      v6->v7:
      - Drop the patch titled "spin lock for ctrl cmd access"
      - Use rtnl_trylock to avoid the deadlock.
      
      v5->v6:
      - Add patch(4/5): spin lock for ctrl cmd access
      - Patch(5/5):
         - Use spin lock and cancel_work_sync to synchronize
      
      v4->v5:
      - Patch(4/4):
         - Fix possible synchronization issues with cancel_work_sync.
         - Reduce if/else nesting levels
      
      v3->v4:
      - Patch(5/5): drop.
      
      v2->v3:
      - Patch(4/5): some minor modifications.
      
      v1->v2:
      - Patch(2/5): a minor fix.
      - Patch(4/5):
         - improve the judgment of dim switch conditions.
         - Cancel the work when vq reset.
      - Patch(5/5): drop the tx dim implementation.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      604ca8ee
    • Heng Qi's avatar
      virtio-net: support rx netdim · 62087995
      Heng Qi authored
      By comparing the traffic information in the complete napi processes,
      let the virtio-net driver automatically adjust the coalescing
      moderation parameters of each receive queue.
      Signed-off-by: default avatarHeng Qi <hengqi@linux.alibaba.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      62087995
    • Heng Qi's avatar
      virtio-net: extract virtqueue coalescig cmd for reuse · 1db43c08
      Heng Qi authored
      Extract commands to set virtqueue coalescing parameters for reuse
      by ethtool -Q, vq resize and netdim.
      Signed-off-by: default avatarHeng Qi <hengqi@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1db43c08
    • Heng Qi's avatar
      virtio-net: separate rx/tx coalescing moderation cmds · d7180080
      Heng Qi authored
      This patch separates the rx and tx global coalescing moderation
      commands to support netdim switches in subsequent patches.
      Signed-off-by: default avatarHeng Qi <hengqi@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7180080
    • Heng Qi's avatar
      virtio-net: returns whether napi is complete · 7949c06a
      Heng Qi authored
      rx netdim needs to count the traffic during a complete napi process,
      and start updating and comparing samples to make decisions after
      the napi ends. Let virtqueue_napi_complete() return true if napi is done,
      otherwise vice versa.
      Signed-off-by: default avatarHeng Qi <hengqi@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7949c06a
    • David S. Miller's avatar
      Merge branch 'ionic-pci-errors' · d2e9464e
      David S. Miller authored
      Shannon Nelson says:
      
      ====================
      ionic: updates to PCI error handling
      
      These are improvements to our PCI error handling, including FLR and
      AER events.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2e9464e
    • Shannon Nelson's avatar
      ionic: fill out pci error handlers · c3a910e1
      Shannon Nelson authored
      Set up the pci_error_handlers error_detected and resume to be useful in
      handling AER events.  If the error detected is pci_channel_io_frozen we
      set up to do an FLR at the end of the AER handling - this tends to clear
      things up well enough that traffic can continue.  Else, let the AER/PCI
      machinery do what is needed for the less serious errors seen.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3a910e1
    • Shannon Nelson's avatar
      ionic: lif debugfs refresh on reset · ce66172d
      Shannon Nelson authored
      Remove and restore the lif's debugfs pointers on a reset,
      and make sure to check for the dentry before removing it
      in case an earlier reset failed to rebuild the lif.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ce66172d