1. 13 Apr, 2023 3 commits
    • Tejun Heo's avatar
      blk-iolatency: s/blkcg_rq_qos/iolat_rq_qos/ · 33049187
      Tejun Heo authored
      The name was too generic given that there are multiple blkcg rq-qos
      policies.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Josef Bacik <josef@toxicpanda.com>
      Link: https://lore.kernel.org/r/20230413000649.115785-4-tj@kernel.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      33049187
    • Tejun Heo's avatar
      blkcg: Restructure blkg_conf_prep() and friends · faffaab2
      Tejun Heo authored
      We want to support lazy init of rq-qos policies so that iolatency is enabled
      lazily on configuration instead of gendisk initialization. The way blkg
      config helpers are structured now is a bit awkward for that. Let's
      restructure:
      
      * blkcg_conf_open_bdev() is renamed to blkg_conf_open_bdev(). The blkcg_
        prefix was used because the bdev opening step is blkg-independent.
        However, the distinction is too subtle and confuses more than helps. Let's
        switch to blkg prefix so that it's consistent with the type and other
        helper names.
      
      * struct blkg_conf_ctx now remembers the original input string and is always
        initialized by the new blkg_conf_init().
      
      * blkg_conf_open_bdev() is updated to take a pointer to blkg_conf_ctx like
        blkg_conf_prep() and can be called multiple times safely. Instead of
        modifying the double pointer to input string directly,
        blkg_conf_open_bdev() now sets blkg_conf_ctx->body.
      
      * blkg_conf_finish() is renamed to blkg_conf_exit() for symmetry and now
        must be called on all blkg_conf_ctx's which were initialized with
        blkg_conf_init().
      
      Combined, this allows the users to either open the bdev first or do it
      altogether with blkg_conf_prep() which will help implementing lazy init of
      rq-qos policies.
      
      blkg_conf_init/exit() will also be used implement synchronization against
      device removal. This is necessary because iolat / iocost are configured
      through cgroupfs instead of one of the files under /sys/block/DEVICE. As
      cgroupfs operations aren't synchronized with block layer, the lazy init and
      other configuration operations may race against device removal. This patch
      makes blkg_conf_init/exit() used consistently for all cgroup-orginating
      configurations making them a good place to implement explicit
      synchronization.
      
      Users are updated accordingly. No behavior change is intended by this patch.
      
      v2: bfq wasn't updated in v1 causing a build error. Fixed.
      
      v3: Update the description to include future use of blkg_conf_init/exit() as
          synchronization points.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Josef Bacik <josef@toxicpanda.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yu Kuai <yukuai1@huaweicloud.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Link: https://lore.kernel.org/r/20230413000649.115785-3-tj@kernel.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      faffaab2
    • Tejun Heo's avatar
      blkcg: Drop unnecessary RCU read [un]locks from blkg_conf_prep/finish() · 83462a6c
      Tejun Heo authored
      Now that all RCU flavors have been combined either holding a spin lock,
      disabling irq or disabling preemption implies RCU read lock, so there's no
      need to use rcu_read_[un]lock() explicitly while holding queue_lock. This
      shouldn't cause any behavior changes.
      
      v2: Description updated. Leave __acquires/release on queue_lock alone.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Link: https://lore.kernel.org/r/20230413000649.115785-2-tj@kernel.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      83462a6c
  2. 12 Apr, 2023 7 commits
  3. 06 Apr, 2023 3 commits
  4. 05 Apr, 2023 5 commits
  5. 03 Apr, 2023 5 commits
  6. 02 Apr, 2023 9 commits
  7. 27 Mar, 2023 2 commits
  8. 20 Mar, 2023 1 commit
  9. 16 Mar, 2023 5 commits