1. 27 Apr, 2022 2 commits
    • Tejun Heo's avatar
      Revert "block: inherit request start time from bio for BLK_CGROUP" · 4cddeaca
      Tejun Heo authored
      This reverts commit 00067077. It has a
      couple problems:
      
      * bio_issue_time() is stored in bio->bi_issue truncated to 51 bits. This
        overflows in slightly over 26 days. Setting rq->io_start_time_ns with it
        means that io duration calculation would yield >26days after 26 days of
        uptime. This, for example, confuses kyber making it cause high IO
        latencies.
      
      * rq->io_start_time_ns should record the time that the IO is issued to the
        device so that on-device latency can be measured. However,
        bio_issue_time() is set before the bio goes through the rq-qos controllers
        (wbt, iolatency, iocost), so when the bio gets throttled in any of the
        mechanisms, the measured latencies make no sense - on-device latencies end
        up higher than request-alloc-to-completion latencies.
      
      We'll need a smarter way to avoid calling ktime_get_ns() repeatedly
      back-to-back. For now, let's revert the commit.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org # v5.16+
      Link: https://lore.kernel.org/r/YmmeOLfo5lzc+8yI@slm.duckdns.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      4cddeaca
    • Tejun Heo's avatar
      iocost: don't reset the inuse weight of under-weighted debtors · 8c936f9e
      Tejun Heo authored
      When an iocg is in debt, its inuse weight is owned by debt handling and
      should stay at 1. This invariant was broken when determining the amount of
      surpluses at the beginning of donation calculation - when an iocg's
      hierarchical weight is too low, the iocg is excluded from donation
      calculation and its inuse is reset to its active regardless of its
      indebtedness, triggering warnings like the following:
      
       WARNING: CPU: 5 PID: 0 at block/blk-iocost.c:1416 iocg_kick_waitq+0x392/0x3a0
       ...
       RIP: 0010:iocg_kick_waitq+0x392/0x3a0
       Code: 00 00 be ff ff ff ff 48 89 4d a8 e8 98 b2 70 00 48 8b 4d a8 85 c0 0f 85 4a fe ff ff 0f 0b e9 43 fe ff ff 0f 0b e9 4d fe ff ff <0f> 0b e9 50 fe ff ff e8 a2 ae 70 00 66 90 0f 1f 44 00 00 55 48 89
       RSP: 0018:ffffc90000200d08 EFLAGS: 00010016
       ...
        <IRQ>
        ioc_timer_fn+0x2e0/0x1470
        call_timer_fn+0xa1/0x2c0
       ...
      
      As this happens only when an iocg's hierarchical weight is negligible, its
      impact likely is limited to triggering the warnings. Fix it by skipping
      resetting inuse of under-weighted debtors.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarRik van Riel <riel@surriel.com>
      Fixes: c421a3eb ("blk-iocost: revamp debt handling")
      Cc: stable@vger.kernel.org # v5.10+
      Link: https://lore.kernel.org/r/YmjODd4aif9BzFuO@slm.duckdns.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8c936f9e
  2. 19 Apr, 2022 2 commits
  3. 15 Apr, 2022 7 commits
  4. 14 Apr, 2022 2 commits
  5. 12 Apr, 2022 2 commits
  6. 06 Apr, 2022 4 commits
  7. 03 Apr, 2022 8 commits
  8. 02 Apr, 2022 13 commits