1. 05 Sep, 2022 3 commits
  2. 04 Sep, 2022 2 commits
  3. 02 Sep, 2022 1 commit
  4. 01 Sep, 2022 1 commit
  5. 26 Aug, 2022 1 commit
  6. 24 Aug, 2022 1 commit
  7. 23 Aug, 2022 1 commit
    • Yu Kuai's avatar
      sbitmap: fix possible io hung due to lost wakeup · 040b83fc
      Yu Kuai authored
      There are two problems can lead to lost wakeup:
      
      1) invalid wakeup on the wrong waitqueue:
      
      For example, 2 * wake_batch tags are put, while only wake_batch threads
      are woken:
      
      __sbq_wake_up
       atomic_cmpxchg -> reset wait_cnt
      			__sbq_wake_up -> decrease wait_cnt
      			...
      			__sbq_wake_up -> wait_cnt is decreased to 0 again
      			 atomic_cmpxchg
      			 sbq_index_atomic_inc -> increase wake_index
      			 wake_up_nr -> wake up and waitqueue might be empty
       sbq_index_atomic_inc -> increase again, one waitqueue is skipped
       wake_up_nr -> invalid wake up because old wakequeue might be empty
      
      To fix the problem, increasing 'wake_index' before resetting 'wait_cnt'.
      
      2) 'wait_cnt' can be decreased while waitqueue is empty
      
      As pointed out by Jan Kara, following race is possible:
      
      CPU1				CPU2
      __sbq_wake_up			 __sbq_wake_up
       sbq_wake_ptr()			 sbq_wake_ptr() -> the same
       wait_cnt = atomic_dec_return()
       /* decreased to 0 */
       sbq_index_atomic_inc()
       /* move to next waitqueue */
       atomic_set()
       /* reset wait_cnt */
       wake_up_nr()
       /* wake up on the old waitqueue */
      				 wait_cnt = atomic_dec_return()
      				 /*
      				  * decrease wait_cnt in the old
      				  * waitqueue, while it can be
      				  * empty.
      				  */
      
      Fix the problem by waking up before updating 'wake_index' and
      'wait_cnt'.
      
      With this patch, noted that 'wait_cnt' is still decreased in the old
      empty waitqueue, however, the wakeup is redirected to a active waitqueue,
      and the extra decrement on the old empty waitqueue is not handled.
      
      Fixes: 88459642 ("blk-mq: abstract tag allocation out into sbitmap library")
      Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20220803121504.212071-1-yukuai1@huaweicloud.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      040b83fc
  8. 22 Aug, 2022 11 commits
  9. 21 Aug, 2022 17 commits
  10. 20 Aug, 2022 2 commits
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.0' of... · 15b3f48a
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix module versioning broken on some architectures
      
       - Make dummy-tools enable CONFIG_PPC_LONG_DOUBLE_128
      
       - Remove -Wformat-zero-length, which has no warning instance
      
       - Fix the order between drivers and libs in modules.order
      
       - Fix false-positive warnings in clang-analyzer
      
      * tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check
        kbuild: fix the modules order between drivers and libs
        scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length
        kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__
        modpost: fix module versioning when a symbol lacks valid CRC
      15b3f48a
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.0-2022-08-19' of... · 16b3d851
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.0-2022-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix alignment for cpu map masks in event encoding.
      
       - Support reading PERF_FORMAT_LOST, perf tool counterpart for a feature
         that was added in this merge window.
      
       - Sync perf tools copies of kernel headers: socket, msr-index, fscrypt,
         cpufeatures, i915_drm, kvm, vhost, perf_event.
      
      * tag 'perf-tools-fixes-for-v6.0-2022-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tools: Support reading PERF_FORMAT_LOST
        libperf: Add a test case for read formats
        libperf: Handle read format in perf_evsel__read()
        tools headers UAPI: Sync linux/perf_event.h with the kernel sources
        tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources
        tools headers UAPI: Sync KVM's vmx.h header with the kernel sources
        tools include UAPI: Sync linux/vhost.h with the kernel sources
        tools headers kvm s390: Sync headers with the kernel sources
        tools headers UAPI: Sync linux/kvm.h with the kernel sources
        tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
        tools headers cpufeatures: Sync with the kernel sources
        tools headers UAPI: Sync linux/fscrypt.h with the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        perf beauty: Update copy of linux/socket.h with the kernel sources
        perf cpumap: Fix alignment for masks in event encoding
        perf cpumap: Compute mask size in constant time
        perf cpumap: Synthetic events and const/static
        perf cpumap: Const map for max()
      16b3d851