1. 08 3月, 2022 17 次提交
  2. 07 3月, 2022 15 次提交
  3. 06 3月, 2022 8 次提交
    • J
      Merge branch 'for-next' of... · a7637069
      Jens Axboe 提交于
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache into for-5.18/drivers
      
      Pull bcache updates from Coly:
      
      "We have 2 patches for Linux v5.18, both of them are from Mingzhe Zou.
       The first patch improves bcache initialization speed by avoid
       unnecessary cost of cache consistency, the second one fixes a potential
       NULL pointer deference in bcache initialization time."
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache:
        bcache: fixup multiple threads crash
        bcache: fixup bcache_dev_sectors_dirty_add() multithreaded CPU false sharing
      a7637069
    • M
      bcache: fixup multiple threads crash · 887554ab
      Mingzhe Zou 提交于
      When multiple threads to check btree nodes in parallel, the main
      thread wait for all threads to stop or CACHE_SET_IO_DISABLE flag:
      
      wait_event_interruptible(check_state->wait,
                               atomic_read(&check_state->started) == 0 ||
                               test_bit(CACHE_SET_IO_DISABLE, &c->flags));
      
      However, the bch_btree_node_read and bch_btree_node_read_done
      maybe call bch_cache_set_error, then the CACHE_SET_IO_DISABLE
      will be set. If the flag already set, the main thread return
      error. At the same time, maybe some threads still running and
      read NULL pointer, the kernel will crash.
      
      This patch change the event wait condition, the main thread must
      wait for all threads to stop.
      
      Fixes: 8e710227 ("bcache: make bch_btree_check() to be multithreaded")
      Signed-off-by: NMingzhe Zou <mingzhe.zou@easystack.cn>
      Cc: stable@vger.kernel.org # v5.7+
      Signed-off-by: NColy Li <colyli@suse.de>
      887554ab
    • M
      bcache: fixup bcache_dev_sectors_dirty_add() multithreaded CPU false sharing · 7b1002f7
      Mingzhe Zou 提交于
      When attaching a cached device (a.k.a backing device) to a cache
      device, bch_sectors_dirty_init() is called to count dirty sectors
      and stripes (see what bcache_dev_sectors_dirty_add() does) on the
      cache device.
      
      When bcache_dev_sectors_dirty_add() is called, set_bit(stripe,
      d->full_dirty_stripes) or clear_bit(stripe, d->full_dirty_stripes)
      operation will always be performed. In full_dirty_stripes, each 1bit
      represents stripe_size (8192) sectors (512B), so 1bit=4MB (8192*512),
      and each CPU cache line=64B=512bit=2048MB. When 20 threads process
      a cached disk with 100G dirty data, a single thread processes about
      23M at a time, and 20 threads total 460M. These full_dirty_stripes
      bits corresponding to the 460M data is likely to fall in the same CPU
      cache line. When one of these threads performs a set_bit or clear_bit
      operation, the same CPU cache line of other threads will become invalid
      and must read the full_dirty_stripes from the main memory again. Compared
      with single thread, the time of a bcache_dev_sectors_dirty_add()
      call is increased by about 50 times in our test (100G dirty data,
      20 threads, bcache_dev_sectors_dirty_add() is called more than
      20 million times).
      
      This patch tries to test_bit before set_bit or clear_bit operation.
      Therefore, a lot of force set and clear operations will be avoided,
      and most of bcache_dev_sectors_dirty_add() calls will only read CPU
      cache line.
      Signed-off-by: NMingzhe Zou <mingzhe.zou@easystack.cn>
      Signed-off-by: NColy Li <colyli@suse.de>
      7b1002f7
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · dcde98da
      Linus Torvalds 提交于
      Pull input updates from Dmitry Torokhov:
      
       - a fixup for Goodix touchscreen driver allowing it to work on certain
         Cherry Trail devices
      
       - a fix for imbalanced enable/disable regulator in Elam touchpad driver
         that became apparent when used with Asus TF103C 2-in-1 dock
      
       - a couple new input keycodes used on newer keyboards
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        HID: add mapping for KEY_ALL_APPLICATIONS
        HID: add mapping for KEY_DICTATE
        Input: elan_i2c - fix regulator enable count imbalance after suspend/resume
        Input: elan_i2c - move regulator_[en|dis]able() out of elan_[en|dis]able_power()
        Input: goodix - workaround Cherry Trail devices with a bogus ACPI Interrupt() resource
        Input: goodix - use the new soc_intel_is_byt() helper
        Input: samsung-keypad - properly state IOMEM dependency
      dcde98da
    • L
      Merge branch 'akpm' (patches from Andrew) · 0014404f
      Linus Torvalds 提交于
      Merge misc fixes from Andrew Morton:
       "8 patches.
      
        Subsystems affected by this patch series: mm (hugetlb, pagemap, and
        userfaultfd), memfd, selftests, and kconfig"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        configs/debug: set CONFIG_DEBUG_INFO=y properly
        proc: fix documentation and description of pagemap
        kselftest/vm: fix tests build with old libc
        memfd: fix F_SEAL_WRITE after shmem huge page allocated
        mm: fix use-after-free when anon vma name is used after vma is freed
        mm: prevent vm_area_struct::anon_name refcount saturation
        mm: refactor vm_area_struct::anon_vma_name usage code
        selftests/vm: cleanup hugetlb file after mremap test
      0014404f
    • L
      Merge tag 's390-5.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · f9026e19
      Linus Torvalds 提交于
      Pull s390 fixes from Vasily Gorbik:
      
       - Fix HAVE_DYNAMIC_FTRACE_WITH_ARGS implementation by providing correct
         switching between ftrace_caller/ftrace_regs_caller and supplying
         pt_regs only when ftrace_regs_caller is activated.
      
       - Fix exception table sorting.
      
       - Fix breakage of kdump tooling by preserving metadata it cannot
         function without.
      
      * tag 's390-5.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/extable: fix exception table sorting
        s390/ftrace: fix arch_ftrace_get_regs implementation
        s390/ftrace: fix ftrace_caller/ftrace_regs_caller generation
        s390/setup: preserve memory at OLDMEM_BASE and OLDMEM_SIZE
      f9026e19
    • Q
      configs/debug: set CONFIG_DEBUG_INFO=y properly · d1eff16d
      Qian Cai 提交于
      CONFIG_DEBUG_INFO can't be set by user directly, so set
      CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y instead.
      
      Otherwise, we end up with no debuginfo in vmlinux which is a big no-no
      for kernel debugging.
      
      Link: https://lkml.kernel.org/r/20220301202920.18488-1-quic_qiancai@quicinc.comSigned-off-by: NQian Cai <quic_qiancai@quicinc.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d1eff16d
    • Y
      proc: fix documentation and description of pagemap · dd21bfa4
      Yun Zhou 提交于
      Since bit 57 was exported for uffd-wp write-protected (commit
      fb8e37f3: "mm/pagemap: export uffd-wp protection information"),
      fixing it can reduce some unnecessary confusion.
      
      Link: https://lkml.kernel.org/r/20220301044538.3042713-1-yun.zhou@windriver.com
      Fixes: fb8e37f3 ("mm/pagemap: export uffd-wp protection information")
      Signed-off-by: NYun Zhou <yun.zhou@windriver.com>
      Reviewed-by: NPeter Xu <peterx@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Tiberiu A Georgescu <tiberiu.georgescu@nutanix.com>
      Cc: Florian Schmidt <florian.schmidt@nutanix.com>
      Cc: Ivan Teterevkov <ivan.teterevkov@nutanix.com>
      Cc: SeongJae Park <sj@kernel.org>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Axel Rasmussen <axelrasmussen@google.com>
      Cc: Miaohe Lin <linmiaohe@huawei.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Colin Cross <ccross@google.com>
      Cc: Alistair Popple <apopple@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dd21bfa4