1. 06 Feb, 2024 1 commit
    • Jan Kara's avatar
      blk-wbt: Fix detection of dirty-throttled tasks · f814bdda
      Jan Kara authored
      The detection of dirty-throttled tasks in blk-wbt has been subtly broken
      since its beginning in 2016. Namely if we are doing cgroup writeback and
      the throttled task is not in the root cgroup, balance_dirty_pages() will
      set dirty_sleep for the non-root bdi_writeback structure. However
      blk-wbt checks dirty_sleep only in the root cgroup bdi_writeback
      structure. Thus detection of recently throttled tasks is not working in
      this case (we noticed this when we switched to cgroup v2 and suddently
      writeback was slow).
      
      Since blk-wbt has no easy way to get to proper bdi_writeback and
      furthermore its intention has always been to work on the whole device
      rather than on individual cgroups, just move the dirty_sleep timestamp
      from bdi_writeback to backing_dev_info. That fixes the checking for
      recently throttled task and saves memory for everybody as a bonus.
      
      CC: stable@vger.kernel.org
      Fixes: b57d74af ("writeback: track if we're sleeping on progress in balance_dirty_pages()")
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20240123175826.21452-1-jack@suse.cz
      [axboe: fixup indentation errors]
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f814bdda
  2. 01 Feb, 2024 24 commits
  3. 31 Jan, 2024 3 commits
  4. 29 Jan, 2024 1 commit
  5. 26 Jan, 2024 2 commits
  6. 25 Jan, 2024 1 commit
    • Mikulas Patocka's avatar
      md: fix a suspicious RCU usage warning · 9f3fe29d
      Mikulas Patocka authored
      RCU protection was removed in the commit 2d32777d ("raid1: remove rcu
      protection to access rdev from conf").
      
      However, the code in fix_read_error does rcu_dereference outside
      rcu_read_lock - this triggers the following warning. The warning is
      triggered by a LVM2 test shell/integrity-caching.sh.
      
      This commit removes rcu_dereference.
      
      =============================
      WARNING: suspicious RCU usage
      6.7.0 #2 Not tainted
      -----------------------------
      drivers/md/raid1.c:2265 suspicious rcu_dereference_check() usage!
      
      other info that might help us debug this:
      
      rcu_scheduler_active = 2, debug_locks = 1
      no locks held by mdX_raid1/1859.
      
      stack backtrace:
      CPU: 2 PID: 1859 Comm: mdX_raid1 Not tainted 6.7.0 #2
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
      Call Trace:
       <TASK>
       dump_stack_lvl+0x60/0x70
       lockdep_rcu_suspicious+0x153/0x1b0
       raid1d+0x1732/0x1750 [raid1]
       ? lock_acquire+0x9f/0x270
       ? finish_wait+0x3d/0x80
       ? md_thread+0xf7/0x130 [md_mod]
       ? lock_release+0xaa/0x230
       ? md_register_thread+0xd0/0xd0 [md_mod]
       md_thread+0xa0/0x130 [md_mod]
       ? housekeeping_test_cpu+0x30/0x30
       kthread+0xdc/0x110
       ? kthread_complete_and_exit+0x20/0x20
       ret_from_fork+0x28/0x40
       ? kthread_complete_and_exit+0x20/0x20
       ret_from_fork_asm+0x11/0x20
       </TASK>
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Fixes: ca294b34 ("md/raid1: support read error check")
      Reviewed-by: default avatarYu Kuai <yukuai3@huawei.com>
      Signed-off-by: default avatarSong Liu <song@kernel.org>
      Link: https://lore.kernel.org/r/51539879-e1ca-fde3-b8b4-8934ddedcbc@redhat.com
      9f3fe29d
  7. 24 Jan, 2024 4 commits
  8. 23 Jan, 2024 2 commits
  9. 22 Jan, 2024 1 commit
  10. 21 Jan, 2024 1 commit