1. 31 3月, 2020 2 次提交
    • H
      net: hns3: fix for fraglist SKB headlen not handling correctly · 74ef402e
      Huazhong Tan 提交于
      When the fraglist SKB headlen is larger than zero, current code
      still handle the fraglist SKB linear data as frag data, which may
      cause TX error.
      
      This patch adds a new DESC_TYPE_FRAGLIST_SKB type to handle the
      mapping and unmapping of the fraglist SKB linear data buffer.
      
      Fixes: 8ae10cfb ("net: hns3: support tx-scatter-gather-fraglist feature")
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74ef402e
    • Y
      net: hns3: drop the WQ_MEM_RECLAIM flag when allocating WQ · 16deaef2
      Yunsheng Lin 提交于
      The WQ in hns3 driver is allocated with WQ_MEM_RECLAIM flag
      in order to guarantee forward progress, which may cause hns3'
      WQ_MEM_RECLAIM WQ flushing infiniband' !WQ_MEM_RECLAIM WQ
      warning:
      
      [11246.200168] hns3 0000:bd:00.1: Reset done, hclge driver initialization finished.
      [11246.209979] hns3 0000:bd:00.1 eth7: net open
      [11246.227608] ------------[ cut here ]------------
      [11246.237370] workqueue: WQ_MEM_RECLAIM hclge:hclge_service_task [hclge] is flushing !WQ_MEM_RECLAIM infiniband:0x0
      [11246.237391] WARNING: CPU: 50 PID: 2279 at ./kernel/workqueue.c:2605 check_flush_dependency+0xcc/0x140
      [11246.260412] Modules linked in: hclgevf hns_roce_hw_v2 rdma_test(O) hns3 xt_CHECKSUM iptable_mangle xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bpfilter vfio_iommu_type1 vfio_pci vfio_virqfd vfio ib_isert iscsi_target_mod ib_ipoib ib_umad rpcrdma ib_iser libiscsi scsi_transport_iscsi aes_ce_blk crypto_simd cryptd aes_ce_cipher sunrpc nls_iso8859_1 crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce joydev input_leds hid_generic usbkbd usbmouse sbsa_gwdt usbhid usb_storage hid ses hclge hisi_zip hisi_hpre hisi_sec2 hnae3 hisi_qm ahci hisi_trng_v2 evbug uacce rng_core gpio_dwapb autofs4 hisi_sas_v3_hw megaraid_sas hisi_sas_main libsas scsi_transport_sas [last unloaded: hns_roce_hw_v2]
      [11246.325742] CPU: 50 PID: 2279 Comm: kworker/50:0 Kdump: loaded Tainted: G           O      5.4.0-rc4+ #1
      [11246.335181] Hardware name: Huawei TaiShan 200 (Model 2280)/BC82AMDD, BIOS 2280-V2 CS V3.B140.01 12/18/2019
      [11246.344802] Workqueue: hclge hclge_service_task [hclge]
      [11246.350007] pstate: 60c00009 (nZCv daif +PAN +UAO)
      [11246.354779] pc : check_flush_dependency+0xcc/0x140
      [11246.359549] lr : check_flush_dependency+0xcc/0x140
      [11246.364317] sp : ffff800268a73990
      [11246.367618] x29: ffff800268a73990 x28: 0000000000000001
      [11246.372907] x27: ffffcbe4f5868000 x26: ffffcbe4f5541000
      [11246.378196] x25: 00000000000000b8 x24: ffff002fdd0ff868
      [11246.383483] x23: ffff002fdd0ff800 x22: ffff2027401ba600
      [11246.388770] x21: 0000000000000000 x20: ffff002fdd0ff800
      [11246.394059] x19: ffff202719293b00 x18: ffffcbe4f5541948
      [11246.399347] x17: 000000006f8ad8dd x16: 0000000000000002
      [11246.404634] x15: ffff8002e8a734f7 x14: 6c66207369205d65
      [11246.409922] x13: 676c63685b206b73 x12: 61745f6563697672
      [11246.415208] x11: 65735f65676c6368 x10: 3a65676c6368204d
      [11246.420494] x9 : 49414c4345525f4d x8 : 6e6162696e69666e
      [11246.425782] x7 : 69204d49414c4345 x6 : ffffcbe4f5765145
      [11246.431068] x5 : 0000000000000000 x4 : 0000000000000000
      [11246.436355] x3 : 0000000000000030 x2 : 00000000ffffffff
      [11246.441642] x1 : 3349eb1ac5310100 x0 : 0000000000000000
      [11246.446928] Call trace:
      [11246.449363]  check_flush_dependency+0xcc/0x140
      [11246.453785]  flush_workqueue+0x110/0x410
      [11246.457691]  ib_cache_cleanup_one+0x54/0x468
      [11246.461943]  __ib_unregister_device+0x70/0xa8
      [11246.466279]  ib_unregister_device+0x2c/0x40
      [11246.470455]  hns_roce_exit+0x34/0x198 [hns_roce_hw_v2]
      [11246.475571]  __hns_roce_hw_v2_uninit_instance.isra.56+0x3c/0x58 [hns_roce_hw_v2]
      [11246.482934]  hns_roce_hw_v2_reset_notify+0xd8/0x210 [hns_roce_hw_v2]
      [11246.489261]  hclge_notify_roce_client+0x84/0xe0 [hclge]
      [11246.494464]  hclge_reset_rebuild+0x60/0x730 [hclge]
      [11246.499320]  hclge_reset_service_task+0x400/0x5a0 [hclge]
      [11246.504695]  hclge_service_task+0x54/0x698 [hclge]
      [11246.509464]  process_one_work+0x15c/0x458
      [11246.513454]  worker_thread+0x144/0x520
      [11246.517186]  kthread+0xfc/0x128
      [11246.520314]  ret_from_fork+0x10/0x18
      [11246.523873] ---[ end trace eb980723699c2585 ]---
      [11246.528710] hns3 0000:bd:00.2: Func clear success after reset.
      [11246.528747] hns3 0000:bd:00.0: Func clear success after reset.
      [11246.907710] hns3 0000:bd:00.1 eth7: link up
      
      According to [1] and [2]:
      
      There seems to be no specific guidance about how to handling the
      forward progress guarantee of network device's WQ yet, and other
      network device's WQ seem to be marked with WQ_MEM_RECLAIM without
      a clear reason.
      
      So this patch removes the WQ_MEM_RECLAIM flag when allocating WQ
      to aviod the above warning.
      
      1. https://www.spinics.net/lists/netdev/msg631646.html
      2. https://www.spinics.net/lists/netdev/msg632097.html
      
      Fixes: 0ea68902 ("net: hns3: allocate WQ with WQ_MEM_RECLAIM flag")
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16deaef2
  2. 30 3月, 2020 1 次提交
    • D
      drivers/base/memory.c: indicate all memory blocks as removable · 53cdc1cb
      David Hildenbrand 提交于
      We see multiple issues with the implementation/interface to compute
      whether a memory block can be offlined (exposed via
      /sys/devices/system/memory/memoryX/removable) and would like to simplify
      it (remove the implementation).
      
      1. It runs basically lockless. While this might be good for performance,
         we see possible races with memory offlining that will require at
         least some sort of locking to fix.
      
      2. Nowadays, more false positives are possible. No arch-specific checks
         are performed that validate if memory offlining will not be denied
         right away (and such check will require locking). For example, arm64
         won't allow to offline any memory block that was added during boot -
         which will imply a very high error rate. Other archs have other
         constraints.
      
      3. The interface is inherently racy. E.g., if a memory block is detected
         to be removable (and was not a false positive at that time), there is
         still no guarantee that offlining will actually succeed. So any
         caller already has to deal with false positives.
      
      4. It is unclear which performance benefit this interface actually
         provides. The introducing commit 5c755e9f ("memory-hotplug: add
         sysfs removable attribute for hotplug memory remove") mentioned
      
      	"A user-level agent must be able to identify which sections
      	 of memory are likely to be removable before attempting the
      	 potentially expensive operation."
      
         However, no actual performance comparison was included.
      
      Known users:
      
       - lsmem: Will group memory blocks based on the "removable" property. [1]
      
       - chmem: Indirect user. It has a RANGE mode where one can specify
                removable ranges identified via lsmem to be offlined. However,
                it also has a "SIZE" mode, which allows a sysadmin to skip the
                manual "identify removable blocks" step. [2]
      
       - powerpc-utils: Uses the "removable" attribute to skip some memory
                blocks right away when trying to find some to offline+remove.
                However, with ballooning enabled, it already skips this
                information completely (because it once resulted in many false
                negatives). Therefore, the implementation can deal with false
                positives properly already. [3]
      
      According to Nathan Fontenot, DLPAR on powerpc is nowadays no longer
      driven from userspace via the drmgr command (powerpc-utils).  Nowadays
      it's managed in the kernel - including onlining/offlining of memory
      blocks - triggered by drmgr writing to /sys/kernel/dlpar.  So the
      affected legacy userspace handling is only active on old kernels.  Only
      very old versions of drmgr on a new kernel (unlikely) might execute
      slower - totally acceptable.
      
      With CONFIG_MEMORY_HOTREMOVE, always indicating "removable" should not
      break any user space tool.  We implement a very bad heuristic now.
      Without CONFIG_MEMORY_HOTREMOVE we cannot offline anything, so report
      "not removable" as before.
      
      Original discussion can be found in [4] ("[PATCH RFC v1] mm:
      is_mem_section_removable() overhaul").
      
      Other users of is_mem_section_removable() will be removed next, so that
      we can remove is_mem_section_removable() completely.
      
      [1] http://man7.org/linux/man-pages/man1/lsmem.1.html
      [2] http://man7.org/linux/man-pages/man8/chmem.8.html
      [3] https://github.com/ibm-power-utilities/powerpc-utils
      [4] https://lkml.kernel.org/r/20200117105759.27905-1-david@redhat.com
      
      Also, this patch probably fixes a crash reported by Steve.
      http://lkml.kernel.org/r/CAPcyv4jpdaNvJ67SkjyUJLBnBnXXQv686BiVW042g03FUmWLXw@mail.gmail.comReported-by: N"Scargall, Steve" <steve.scargall@intel.com>
      Suggested-by: NMichal Hocko <mhocko@kernel.org>
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NNathan Fontenot <ndfont@gmail.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Karel Zak <kzak@redhat.com>
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20200128093542.6908-1-david@redhat.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      53cdc1cb
  3. 28 3月, 2020 3 次提交
  4. 27 3月, 2020 5 次提交
  5. 26 3月, 2020 8 次提交
  6. 25 3月, 2020 16 次提交
  7. 24 3月, 2020 5 次提交