1. 08 Jun, 2021 1 commit
    • Jan Kara's avatar
      rq-qos: fix missed wake-ups in rq_qos_throttle try two · 11c7aa0d
      Jan Kara authored
      Commit 545fbd07 ("rq-qos: fix missed wake-ups in rq_qos_throttle")
      tried to fix a problem that a process could be sleeping in rq_qos_wait()
      without anyone to wake it up. However the fix is not complete and the
      following can still happen:
      
      CPU1 (waiter1)		CPU2 (waiter2)		CPU3 (waker)
      rq_qos_wait()		rq_qos_wait()
        acquire_inflight_cb() -> fails
      			  acquire_inflight_cb() -> fails
      
      						completes IOs, inflight
      						  decreased
        prepare_to_wait_exclusive()
      			  prepare_to_wait_exclusive()
        has_sleeper = !wq_has_single_sleeper() -> true as there are two sleepers
      			  has_sleeper = !wq_has_single_sleeper() -> true
        io_schedule()		  io_schedule()
      
      Deadlock as now there's nobody to wakeup the two waiters. The logic
      automatically blocking when there are already sleepers is really subtle
      and the only way to make it work reliably is that we check whether there
      are some waiters in the queue when adding ourselves there. That way, we
      are guaranteed that at least the first process to enter the wait queue
      will recheck the waiting condition before going to sleep and thus
      guarantee forward progress.
      
      Fixes: 545fbd07
      
       ("rq-qos: fix missed wake-ups in rq_qos_throttle")
      CC: stable@vger.kernel.org
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20210607112613.25344-1-jack@suse.cz
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      11c7aa0d
  2. 15 Jul, 2020 1 commit
  3. 28 Jun, 2020 1 commit
  4. 06 Oct, 2019 1 commit
    • Harshad Shirwadkar's avatar
      blk-wbt: fix performance regression in wbt scale_up/scale_down · b84477d3
      Harshad Shirwadkar authored
      scale_up wakes up waiters after scaling up. But after scaling max, it
      should not wake up more waiters as waiters will not have anything to
      do. This patch fixes this by making scale_up (and also scale_down)
      return when threshold is reached.
      
      This bug causes increased fdatasync latency when fdatasync and dd
      conv=sync are performed in parallel on 4.19 compared to 4.14. This
      bug was introduced during refactoring of blk-wbt code.
      
      Fixes: a7905043
      
       ("blk-rq-qos: refactor out common elements of blk-wbt")
      Cc: stable@vger.kernel.org
      Cc: Josef Bacik <jbacik@fb.com>
      Signed-off-by: default avatarHarshad Shirwadkar <harshadshirwadkar@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      b84477d3
  5. 29 Aug, 2019 2 commits
  6. 18 Jul, 2019 4 commits
  7. 31 May, 2019 1 commit
  8. 30 Apr, 2019 1 commit
  9. 17 Dec, 2018 1 commit
    • Ming Lei's avatar
      blk-mq-debugfs: support rq_qos · cc56694f
      Ming Lei authored
      
      blk-mq-debugfs has been proved as very helpful for debug some
      tough issues, such as IO hang.
      
      We have seen blk-wbt related IO hang several times, even inside
      Red Hat BZ, there is such report not sovled yet, so this patch
      adds support debugfs on rq_qos.
      
      Cc: Bart Van Assche <bart.vanassche@wdc.com>
      Cc: Omar Sandoval <osandov@fb.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Josef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cc56694f
  10. 08 Dec, 2018 1 commit
    • Josef Bacik's avatar
      block: add rq_qos_wait to rq_qos · 84f60324
      Josef Bacik authored
      
      Originally when I split out the common code from blk-wbt into rq_qos I
      left the wbt_wait() where it was and simply copied and modified it
      slightly to work for io-latency.  However they are both basically the
      same thing, and as time has gone on wbt_wait() has ended up much smarter
      and kinder than it was when I copied it into io-latency, which means
      io-latency has lost out on these improvements.
      
      Since they are the same thing essentially except for a few minor things,
      create rq_qos_wait() that replicates what wbt_wait() currently does with
      callbacks that can be passed in for the snowflakes to do their own thing
      as appropriate.
      Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      84f60324
  11. 16 Nov, 2018 1 commit
  12. 15 Nov, 2018 1 commit
  13. 22 Jul, 2018 1 commit
  14. 09 Jul, 2018 3 commits