1. 10 Apr, 2021 2 commits
    • Nicholas Piggin's avatar
      genirq: Reduce irqdebug cacheline bouncing · 7c07012e
      Nicholas Piggin authored
      note_interrupt() increments desc->irq_count for each interrupt even for
      percpu interrupt handlers, even when they are handled successfully. This
      causes cacheline bouncing and limits scalability.
      
      Instead of incrementing irq_count every time, only start incrementing it
      after seeing an unhandled irq, which should avoid the cache line
      bouncing in the common path.
      
      This actually should give better consistency in handling misbehaving
      irqs too, because instead of the first unhandled irq arriving at an
      arbitrary point in the irq_count cycle, its arrival will begin the
      irq_count cycle.
      
      Cédric reports the result of his IPI throughput test:
      
                     Millions of IPIs/s
       -----------   --------------------------------------
                     upstream   upstream   patched
       chips  cpus   default    noirqdebug default (irqdebug)
       -----------   -----------------------------------------
       1      0-15     4.061      4.153      4.084
              0-31     7.937      8.186      8.158
              0-47    11.018     11.392     11.233
              0-63    11.460     13.907     14.022
       2      0-79     8.376     18.105     18.084
              0-95     7.338     22.101     22.266
              0-111    6.716     25.306     25.473
              0-127    6.223     27.814     28.029
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/20210402132037.574661-1-npiggin@gmail.com
      7c07012e
    • Tetsuo Handa's avatar
      kernel: Initialize cpumask before parsing · c5e3a411
      Tetsuo Handa authored
      KMSAN complains that new_value at cpumask_parse_user() from
      write_irq_affinity() from irq_affinity_proc_write() is uninitialized.
      
        [  148.133411][ T5509] =====================================================
        [  148.135383][ T5509] BUG: KMSAN: uninit-value in find_next_bit+0x325/0x340
        [  148.137819][ T5509]
        [  148.138448][ T5509] Local variable ----new_value.i@irq_affinity_proc_write created at:
        [  148.140768][ T5509]  irq_affinity_proc_write+0xc3/0x3d0
        [  148.142298][ T5509]  irq_affinity_proc_write+0xc3/0x3d0
        [  148.143823][ T5509] =====================================================
      
      Since bitmap_parse() from cpumask_parse_user() calls find_next_bit(),
      any alloc_cpumask_var() + cpumask_parse_user() sequence has possibility
      that find_next_bit() accesses uninitialized cpu mask variable. Fix this
      problem by replacing alloc_cpumask_var() with zalloc_cpumask_var().
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Link: https://lore.kernel.org/r/20210401055823.3929-1-penguin-kernel@I-love.SAKURA.ne.jp
      c5e3a411
  2. 30 Mar, 2021 1 commit
  3. 25 Mar, 2021 1 commit
  4. 22 Mar, 2021 1 commit
  5. 19 Mar, 2021 1 commit
  6. 17 Mar, 2021 22 commits
  7. 16 Mar, 2021 2 commits
  8. 06 Mar, 2021 5 commits
  9. 05 Mar, 2021 5 commits
    • Linus Torvalds's avatar
      Merge tag 'for-5.12/dm-fixes' of... · 63dcd69d
      Linus Torvalds authored
      Merge tag 'for-5.12/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
       "Fix DM verity target's optional Forward Error Correction (FEC) for
        Reed-Solomon roots that are unaligned to block size"
      
      * tag 'for-5.12/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm verity: fix FEC for RS roots unaligned to block size
        dm bufio: subtract the number of initial sectors in dm_bufio_get_device_size
      63dcd69d
    • Linus Torvalds's avatar
      Merge tag 'block-5.12-2021-03-05' of git://git.kernel.dk/linux-block · 47454caf
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe fixes:
            - more device quirks (Julian Einwag, Zoltán Böszörményi, Pascal
              Terjan)
            - fix a hwmon error return (Daniel Wagner)
            - fix the keep alive timeout initialization (Martin George)
            - ensure the model_number can't be changed on a used subsystem
              (Max Gurtovoy)
      
       - rsxx missing -EFAULT on copy_to_user() failure (Dan)
      
       - rsxx remove unused linux.h include (Tian)
      
       - kill unused RQF_SORTED (Jean)
      
       - updated outdated BFQ comments (Joseph)
      
       - revert work-around commit for bd_size_lock, since we removed the
         offending user in this merge window (Damien)
      
      * tag 'block-5.12-2021-03-05' of git://git.kernel.dk/linux-block:
        nvmet: model_number must be immutable once set
        nvme-fabrics: fix kato initialization
        nvme-hwmon: Return error code when registration fails
        nvme-pci: add quirks for Lexar 256GB SSD
        nvme-pci: mark Kingston SKC2000 as not supporting the deepest power state
        nvme-pci: mark Seagate Nytro XM1440 as QUIRK_NO_NS_DESC_LIST.
        rsxx: Return -EFAULT if copy_to_user() fails
        block/bfq: update comments and default value in docs for fifo_expire
        rsxx: remove unused including <linux/version.h>
        block: Drop leftover references to RQF_SORTED
        block: revert "block: fix bd_size_lock use"
      47454caf
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.12-2021-03-05' of git://git.kernel.dk/linux-block · f292e873
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A bit of a mix between fallout from the worker change, cleanups and
        reductions now possible from that change, and fixes in general. In
        detail:
      
         - Fully serialize manager and worker creation, fixing races due to
           that.
      
         - Clean up some naming that had gone stale.
      
         - SQPOLL fixes.
      
         - Fix race condition around task_work rework that went into this
           merge window.
      
         - Implement unshare. Used for when the original task does unshare(2)
           or setuid/seteuid and friends, drops the original workers and forks
           new ones.
      
         - Drop the only remaining piece of state shuffling we had left, which
           was cred. Move it into issue instead, and we can drop all of that
           code too.
      
         - Kill f_op->flush() usage. That was such a nasty hack that we had
           out of necessity, we no longer need it.
      
         - Following from ->flush() removal, we can also drop various bits of
           ctx state related to SQPOLL and cancelations.
      
         - Fix an issue with IOPOLL retry, which originally was fallout from a
           filemap change (removing iov_iter_revert()), but uncovered an issue
           with iovec re-import too late.
      
         - Fix an issue with system suspend.
      
         - Use xchg() for fallback work, instead of cmpxchg().
      
         - Properly destroy io-wq on exec.
      
         - Add create_io_thread() core helper, and use that in io-wq and
           io_uring. This allows us to remove various silly completion events
           related to thread setup.
      
         - A few error handling fixes.
      
        This should be the grunt of fixes necessary for the new workers, next
        week should be quieter. We've got a pending series from Pavel on
        cancelations, and how tasks and rings are indexed. Outside of that,
        should just be minor fixes. Even with these fixes, we're still killing
        a net ~80 lines"
      
      * tag 'io_uring-5.12-2021-03-05' of git://git.kernel.dk/linux-block: (41 commits)
        io_uring: don't restrict issue_flags for io_openat
        io_uring: make SQPOLL thread parking saner
        io-wq: kill hashed waitqueue before manager exits
        io_uring: clear IOCB_WAITQ for non -EIOCBQUEUED return
        io_uring: don't keep looping for more events if we can't flush overflow
        io_uring: move to using create_io_thread()
        kernel: provide create_io_thread() helper
        io_uring: reliably cancel linked timeouts
        io_uring: cancel-match based on flags
        io-wq: ensure all pending work is canceled on exit
        io_uring: ensure that threads freeze on suspend
        io_uring: remove extra in_idle wake up
        io_uring: inline __io_queue_async_work()
        io_uring: inline io_req_clean_work()
        io_uring: choose right tctx->io_wq for try cancel
        io_uring: fix -EAGAIN retry with IOPOLL
        io-wq: fix error path leak of buffered write hash map
        io_uring: remove sqo_task
        io_uring: kill sqo_dead and sqo submission halting
        io_uring: ignore double poll add on the same waitqueue head
        ...
      f292e873
    • Linus Torvalds's avatar
      Merge tag 'pm-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 6d47254c
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix the usage of device links in the runtime PM core code and
        update the DTPM (Dynamic Thermal Power Management) feature added
        recently.
      
        Specifics:
      
         - Make the runtime PM core code avoid attempting to suspend supplier
           devices before updating the PM-runtime status of a consumer to
           'suspended' (Rafael Wysocki).
      
         - Fix DTPM (Dynamic Thermal Power Management) root node
           initialization and label that feature as EXPERIMENTAL in Kconfig
           (Daniel Lezcano)"
      
      * tag 'pm-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        powercap/drivers/dtpm: Add the experimental label to the option description
        powercap/drivers/dtpm: Fix root node initialization
        PM: runtime: Update device status before letting suppliers suspend
      6d47254c
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ea6be461
      Linus Torvalds authored
      Pull ACPI fix from Rafael Wysocki:
       "Make the empty stubs of some helper functions used when CONFIG_ACPI is
        not set actually match those functions (Andy Shevchenko)"
      
      * tag 'acpi-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: bus: Constify is_acpi_node() and friends (part 2)
      ea6be461