Skip to content
  1. Jan 08, 2020
    • Chuck Lever's avatar
      RDMA/core: Add trace points to follow MR allocation · 622db5b6
      Chuck Lever authored
      
      
      Track the lifetime of ib_mr objects. Here's sample output from a test run
      with NFS/RDMA:
      
                 <...>-361   [009] 79238.772782: mr_alloc:             pd.id=3 mr.id=11 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.772812: mr_alloc:             pd.id=3 mr.id=12 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.772839: mr_alloc:             pd.id=3 mr.id=13 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.772866: mr_alloc:             pd.id=3 mr.id=14 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.772893: mr_alloc:             pd.id=3 mr.id=15 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.772921: mr_alloc:             pd.id=3 mr.id=16 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.772947: mr_alloc:             pd.id=3 mr.id=17 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.772974: mr_alloc:             pd.id=3 mr.id=18 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.773001: mr_alloc:             pd.id=3 mr.id=19 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.773028: mr_alloc:             pd.id=3 mr.id=20 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79238.773055: mr_alloc:             pd.id=3 mr.id=21 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.270942: mr_alloc:             pd.id=3 mr.id=22 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.270975: mr_alloc:             pd.id=3 mr.id=23 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271007: mr_alloc:             pd.id=3 mr.id=24 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271036: mr_alloc:             pd.id=3 mr.id=25 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271067: mr_alloc:             pd.id=3 mr.id=26 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271095: mr_alloc:             pd.id=3 mr.id=27 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271121: mr_alloc:             pd.id=3 mr.id=28 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271153: mr_alloc:             pd.id=3 mr.id=29 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271181: mr_alloc:             pd.id=3 mr.id=30 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271208: mr_alloc:             pd.id=3 mr.id=31 type=MEM_REG max_num_sg=30 rc=0
                 <...>-361   [009] 79240.271236: mr_alloc:             pd.id=3 mr.id=32 type=MEM_REG max_num_sg=30 rc=0
                 <...>-4351  [001] 79242.299400: mr_dereg:             mr.id=32
                 <...>-4351  [001] 79242.299467: mr_dereg:             mr.id=31
                 <...>-4351  [001] 79242.299554: mr_dereg:             mr.id=30
                 <...>-4351  [001] 79242.299615: mr_dereg:             mr.id=29
                 <...>-4351  [001] 79242.299684: mr_dereg:             mr.id=28
                 <...>-4351  [001] 79242.299748: mr_dereg:             mr.id=27
                 <...>-4351  [001] 79242.299812: mr_dereg:             mr.id=26
                 <...>-4351  [001] 79242.299874: mr_dereg:             mr.id=25
                 <...>-4351  [001] 79242.299944: mr_dereg:             mr.id=24
                 <...>-4351  [001] 79242.300009: mr_dereg:             mr.id=23
                 <...>-4351  [001] 79242.300190: mr_dereg:             mr.id=22
                 <...>-4351  [001] 79242.300263: mr_dereg:             mr.id=21
                 <...>-4351  [001] 79242.300326: mr_dereg:             mr.id=20
                 <...>-4351  [001] 79242.300388: mr_dereg:             mr.id=19
                 <...>-4351  [001] 79242.300450: mr_dereg:             mr.id=18
                 <...>-4351  [001] 79242.300516: mr_dereg:             mr.id=17
                 <...>-4351  [001] 79242.300629: mr_dereg:             mr.id=16
                 <...>-4351  [001] 79242.300718: mr_dereg:             mr.id=15
                 <...>-4351  [001] 79242.300784: mr_dereg:             mr.id=14
                 <...>-4351  [001] 79242.300879: mr_dereg:             mr.id=13
                 <...>-4351  [001] 79242.300945: mr_dereg:             mr.id=12
                 <...>-4351  [001] 79242.301012: mr_dereg:             mr.id=11
      
      Some features of the output:
      - The lifetime and owner PD of each MR is clearly visible.
      - The type of MR is captured, as is the SGE array size.
      - Failing MR allocation can be recorded.
      
      Link: https://lore.kernel.org/r/20191218201820.30584.34636.stgit@manet.1015granger.net
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      622db5b6
    • Chuck Lever's avatar
      RDMA/core: Trace points for diagnosing completion queue issues · 3e5901cb
      Chuck Lever authored
      
      
      Sample trace events:
      
         kworker/u29:0-300   [007]   120.042217: cq_alloc:             cq.id=4 nr_cqe=161 comp_vector=2 poll_ctx=WORKQUEUE
                <idle>-0     [002]   120.056292: cq_schedule:          cq.id=4
          kworker/2:1H-482   [002]   120.056402: cq_process:           cq.id=4 wake-up took 109 [us] from interrupt
          kworker/2:1H-482   [002]   120.056407: cq_poll:              cq.id=4 requested 16, returned 1
                <idle>-0     [002]   120.067503: cq_schedule:          cq.id=4
          kworker/2:1H-482   [002]   120.067537: cq_process:           cq.id=4 wake-up took 34 [us] from interrupt
          kworker/2:1H-482   [002]   120.067541: cq_poll:              cq.id=4 requested 16, returned 1
                <idle>-0     [002]   120.067657: cq_schedule:          cq.id=4
          kworker/2:1H-482   [002]   120.067672: cq_process:           cq.id=4 wake-up took 15 [us] from interrupt
          kworker/2:1H-482   [002]   120.067674: cq_poll:              cq.id=4 requested 16, returned 1
      
       ...
      
               systemd-1     [002]   122.392653: cq_schedule:          cq.id=4
          kworker/2:1H-482   [002]   122.392688: cq_process:           cq.id=4 wake-up took 35 [us] from interrupt
          kworker/2:1H-482   [002]   122.392693: cq_poll:              cq.id=4 requested 16, returned 16
          kworker/2:1H-482   [002]   122.392836: cq_poll:              cq.id=4 requested 16, returned 16
          kworker/2:1H-482   [002]   122.392970: cq_poll:              cq.id=4 requested 16, returned 16
          kworker/2:1H-482   [002]   122.393083: cq_poll:              cq.id=4 requested 16, returned 16
          kworker/2:1H-482   [002]   122.393195: cq_poll:              cq.id=4 requested 16, returned 3
      
      Several features to note in this output:
       - The WCE count and context type are reported at allocation time
       - The CPU and kworker for each CQ is evident
       - The CQ's restracker ID is tagged on each trace event
       - CQ poll scheduling latency is measured
       - Details about how often single completions occur versus multiple
         completions are evident
       - The cost of the ULP's completion handler is recorded
      
      Link: https://lore.kernel.org/r/20191218201815.30584.3481.stgit@manet.1015granger.net
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      3e5901cb
    • Chuck Lever's avatar
      RDMA/cma: Add trace points in RDMA Connection Manager · ed999f82
      Chuck Lever authored
      
      
      Record state transitions as each connection is established. The IP address
      of both peers and the Type of Service is reported. These trace points are
      not in performance hot paths.
      
      Also, record each cm_event_handler call to ULPs. This eliminates the need
      for each ULP to add its own similar trace point in its CM event handler
      function.
      
      These new trace points appear in a new trace subsystem called "rdma_cma".
      
      Sample events:
      
                 <...>-220   [004]   121.430733: cm_id_create:         cm.id=0
                 <...>-472   [003]   121.430991: cm_event_handler:     cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 ADDR_RESOLVED (0/0)
                 <...>-472   [003]   121.430995: cm_event_done:        cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 result=0
                 <...>-472   [003]   121.431172: cm_event_handler:     cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 ROUTE_RESOLVED (2/0)
                 <...>-472   [003]   121.431174: cm_event_done:        cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 result=0
                 <...>-220   [004]   121.433480: cm_qp_create:         cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 pd.id=2 qp_type=RC send_wr=4091 recv_wr=256 qp_num=521 rc=0
                 <...>-220   [004]   121.433577: cm_send_req:          cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 qp_num=521
           kworker/1:2-973   [001]   121.436190: cm_send_mra:          cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0
           kworker/1:2-973   [001]   121.436340: cm_send_rtu:          cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0
           kworker/1:2-973   [001]   121.436359: cm_event_handler:     cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 ESTABLISHED (9/0)
           kworker/1:2-973   [001]   121.436365: cm_event_done:        cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 result=0
                 <...>-1975  [005]   123.161954: cm_disconnect:        cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0
                 <...>-1975  [005]   123.161974: cm_sent_dreq:         cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0
                 <...>-220   [004]   123.162102: cm_disconnect:        cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0
           kworker/0:1-13    [000]   123.162391: cm_event_handler:     cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 DISCONNECTED (10/0)
           kworker/0:1-13    [000]   123.162393: cm_event_done:        cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 result=0
                 <...>-220   [004]   123.164456: cm_qp_destroy:        cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 qp_num=521
                 <...>-220   [004]   123.165290: cm_id_destroy:        cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0
      
      Some features to note:
      - restracker ID of the rdma_cm_id is tagged on each trace event
      - The source and destination IP addresses and TOS are reported
      - CM event upcalls are shown with decoded event and status
      - CM state transitions are reported
      - rdma_cm_id lifetime events are captured
      - The latency of ULP CM event handlers is reported
      - Lifetime events of associated QPs are reported
      - Device removal and insertion is reported
      
      This patch is based on previous work by:
      
      Saeed Mahameed <saeedm@mellanox.com>
      Mukesh Kacker <mukesh.kacker@oracle.com>
      Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
      Aron Silverton <aron.silverton@oracle.com>
      Avinash Repaka <avinash.repaka@oracle.com>
      Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
      
      Link: https://lore.kernel.org/r/20191218201810.30584.3052.stgit@manet.1015granger.net
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      ed999f82
  2. Jan 04, 2020
  3. Dec 30, 2019
    • Linus Torvalds's avatar
      Linux 5.5-rc4 · fd698849
      Linus Torvalds authored
      v5.5-rc4
      fd698849
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · a99efa00
      Linus Torvalds authored
      Pull RISC-V fixes from Paul Walmsley:
       "One important fix for RISC-V:
      
         - Redirect any incoming syscall with an ID less than -1 to
           sys_ni_syscall, rather than allowing them to fall through into the
           syscall handler.
      
        and two minor build fixes:
      
         - Export __asm_copy_{from,to}_user() from where they are defined.
           This fixes a build error triggered by some randconfigs.
      
         - Export flush_icache_all(). I'd resisted this before, since
           historically we didn't want modules to be able to flush the I$
           directly; but apparently everyone else is doing it now"
      
      * tag 'riscv/for-v5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: export flush_icache_all to modules
        riscv: reject invalid syscalls below -1
        riscv: fix compile failure with EXPORT_SYMBOL() & !MMU
      a99efa00
    • Linus Torvalds's avatar
      Merge tag 'locks-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux · d7566386
      Linus Torvalds authored
      Pull /proc/locks formatting fix from Jeff Layton:
       "This is a trivial fix for a _very_ long standing bug in /proc/locks
        formatting. Ordinarily, I'd wait for the merge window for something
        like this, but it is making it difficult to validate some overlayfs
        fixes.
      
        I've also gone ahead and marked this for stable"
      
      * tag 'locks-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
        locks: print unsigned ino in /proc/locks
      d7566386
    • Linus Torvalds's avatar
      Merge tag '5.5-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · cc2f36ec
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "One performance fix for large directory searches, and one minor style
        cleanup noticed by Clang"
      
      * tag '5.5-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Optimize readdir on reparse points
        cifs: Adjust indentation in smb2_open_file
      cc2f36ec
  4. Dec 29, 2019
  5. Dec 28, 2019
    • Olof Johansson's avatar
      riscv: export flush_icache_all to modules · 1833e327
      Olof Johansson authored
      
      
      This is needed by LKDTM (crash dump test module), it calls
      flush_icache_range(), which on RISC-V turns into flush_icache_all(). On
      other architectures, the actual implementation is exported, so follow
      that precedence and export it here too.
      
      Fixes build of CONFIG_LKDTM that fails with:
      ERROR: "flush_icache_all" [drivers/misc/lkdtm/lkdtm.ko] undefined!
      
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      1833e327
    • David Abdurachmanov's avatar
      riscv: reject invalid syscalls below -1 · 556f47ac
      David Abdurachmanov authored
      
      
      Running "stress-ng --enosys 4 -t 20 -v" showed a large number of kernel oops
      with "Unable to handle kernel paging request at virtual address" message. This
      happens when enosys stressor starts testing random non-valid syscalls.
      
      I forgot to redirect any syscall below -1 to sys_ni_syscall.
      
      With the patch kernel oops messages are gone while running stress-ng enosys
      stressor.
      
      Signed-off-by: default avatarDavid Abdurachmanov <david.abdurachmanov@sifive.com>
      Fixes: 5340627e
      
       ("riscv: add support for SECCOMP and SECCOMP_FILTER")
      Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      556f47ac
    • Luc Van Oostenryck's avatar
      riscv: fix compile failure with EXPORT_SYMBOL() & !MMU · 4d47ce15
      Luc Van Oostenryck authored
      When support for !MMU was added, the declaration of
      __asm_copy_to_user() & __asm_copy_from_user() were #ifdefed
      out hence their EXPORT_SYMBOL() give an error message like:
        .../riscv_ksyms.c:13:15: error: '__asm_copy_to_user' undeclared here
        .../riscv_ksyms.c:14:15: error: '__asm_copy_from_user' undeclared here
      
      Since these symbols are not defined with !MMU it's wrong to export them.
      Same for __clear_user() (even though this one is also declared in
      include/asm-generic/uaccess.h and thus doesn't give an error message).
      
      Fix this by doing the EXPORT_SYMBOL() directly where these symbols
      are defined: inside lib/uaccess.S itself.
      
      Fixes: 6bd33e1e
      
       ("riscv: fix compile failure with EXPORT_SYMBOL() & !MMU")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      4d47ce15
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · bf8d1cd4
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four fixes and one spelling update, all in drivers: two in lpfc and
        the rest in mp3sas, cxgbi and target"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: target/iblock: Fix protection error with blocks greater than 512B
        scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy()
        scsi: lpfc: fix spelling mistakes of asynchronous
        scsi: lpfc: fix build failure with DEBUGFS disabled
        scsi: mpt3sas: Fix double free in attach error handling
      bf8d1cd4
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm · 48a8dd17
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Post-xmas food coma recovery fixes. Only three fixes for i915 since I
        expect most people are holidaying.
      
        i915:
         - power management rc6 fix
         - framebuffer tracking fix
         - display power management ratelimit fix"
      
      * tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm:
        drm/i915: Hold reference to intel_frontbuffer as we track activity
        drm/i915/gt: Ratelimit display power w/a
        drm/i915/pmu: Ensure monotonic rc6
      48a8dd17
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-5.5-rc4' of... · f4b39746
      Linus Torvalds authored
      Merge tag 'linux-kselftest-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fixes from Shuah Khan:
      
       - rseq build failures fixes related to glibc 2.30 compatibility from
         Mathieu Desnoyers
      
       - Kunit fixes and cleanups from SeongJae Park
      
       - Fixes to filesystems/epoll, firmware, and livepatch build failures
         and skip handling.
      
      * tag 'linux-kselftest-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        rseq/selftests: Clarify rseq_prepare_unload() helper requirements
        rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30
        rseq/selftests: Turn off timeout setting
        kunit/kunit_tool_test: Test '--build_dir' option run
        kunit: Rename 'kunitconfig' to '.kunitconfig'
        kunit: Place 'test.log' under the 'build_dir'
        kunit: Create default config in '--build_dir'
        kunit: Remove duplicated defconfig creation
        docs/kunit/start: Use in-tree 'kunit_defconfig'
        selftests: livepatch: Fix it to do root uid check and skip
        selftests: firmware: Fix it to do root uid check and skip
        selftests: filesystems/epoll: fix build error
      f4b39746
    • Linus Torvalds's avatar
      Merge tag 'pm-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1413c361
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "Fix compile test of the Tegra devfreq driver (Arnd Bergmann) and
        remove redundant Kconfig dependencies from multiple devfreq drivers
        (Leonard Crestez)"
      
      * tag 'pm-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / devfreq: tegra: Add COMMON_CLK dependency
        PM / devfreq: Drop explicit selection of PM_OPP
      1413c361
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.5-20191226' of git://git.kernel.dk/linux-block · 534121d2
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Removal of now unused busy wqe list (Hillf)
      
       - Add cond_resched() to io-wq work processing (Hillf)
      
       - And then the series that I hinted at from last week, which removes
         the sqe from the io_kiocb and keeps all sqe handling on the prep
         side. This guarantees that an opcode can't do the wrong thing and
         read the sqe more than once. This is unchanged from last week, no
         issues have been observed with this in testing. Hence I really think
         we should fold this into 5.5.
      
      * tag 'io_uring-5.5-20191226' of git://git.kernel.dk/linux-block:
        io-wq: add cond_resched() to worker thread
        io-wq: remove unused busy list from io_sqe
        io_uring: pass in 'sqe' to the prep handlers
        io_uring: standardize the prep methods
        io_uring: read 'count' for IORING_OP_TIMEOUT in prep handler
        io_uring: move all prep state for IORING_OP_{SEND,RECV}_MGS to prep handler
        io_uring: move all prep state for IORING_OP_CONNECT to prep handler
        io_uring: add and use struct io_rw for read/writes
        io_uring: use u64_to_user_ptr() consistently
      534121d2