1. 29 Jul, 2023 1 commit
    • Jens Axboe's avatar
      Merge tag 'md-next-20230729' of... · d276bb29
      Jens Axboe authored
      Merge tag 'md-next-20230729' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.6/block
      
      Pull MD updates from Song:
      
      "1. Deprecate bitmap file support, by Christoph Hellwig;
       2. Fix deadlock with md sync thread, by Yu Kuai;
       3. Refactor md io accounting, by Yu Kuai;
       4. Various non-urgent fixes by Li Nan, Yu Kuai, and Jack Wang."
      
      * tag 'md-next-20230729' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: (36 commits)
        md/md-bitmap: hold 'reconfig_mutex' in backlog_store()
        md/md-bitmap: remove unnecessary local variable in backlog_store()
        md/raid10: use dereference_rdev_and_rrdev() to get devices
        md/raid10: factor out dereference_rdev_and_rrdev()
        md/raid10: check replacement and rdev to prevent submit the same io twice
        md/raid1: Avoid lock contention from wake_up()
        md: restore 'noio_flag' for the last mddev_resume()
        md: don't quiesce in mddev_suspend()
        md: remove redundant check in fix_read_error()
        md/raid10: optimize fix_read_error
        md/raid1: prioritize adding disk to 'removed' mirror
        md/md-faulty: enable io accounting
        md/md-linear: enable io accounting
        md/md-multipath: enable io accounting
        md/raid10: switch to use md_account_bio() for io accounting
        md/raid1: switch to use md_account_bio() for io accounting
        raid5: fix missing io accounting in raid5_align_endio()
        md: also clone new io if io accounting is disabled
        md: move initialization and destruction of 'io_acct_set' to md.c
        md: deprecate bitmap file support
        ...
      d276bb29
  2. 27 Jul, 2023 36 commits
  3. 26 Jul, 2023 1 commit
  4. 25 Jul, 2023 2 commits
    • Bart Van Assche's avatar
      block: Improve performance for BLK_MQ_F_BLOCKING drivers · 65a558f6
      Bart Van Assche authored
      blk_mq_run_queue() runs the queue asynchronously if BLK_MQ_F_BLOCKING
      has been set. This is suboptimal since running the queue asynchronously
      is slower than running the queue synchronously. This patch modifies
      blk_mq_run_queue() as follows if BLK_MQ_F_BLOCKING has been set:
      - Run the queue synchronously if it is allowed to sleep.
      - Run the queue asynchronously if it is not allowed to sleep.
      Additionally, blk_mq_run_hw_queue(hctx, false) calls are modified into
      blk_mq_run_hw_queue(hctx, hctx->flags & BLK_MQ_F_BLOCKING) if the caller
      may be invoked from atomic context.
      
      The following caller chains have been reviewed:
      
      blk_mq_run_hw_queue(hctx, false)
        blk_mq_get_tag()      /* may sleep, hence the functions it calls may also sleep */
        blk_execute_rq()             /* may sleep */
        blk_mq_run_hw_queues(q, async=false)
          blk_freeze_queue_start()   /* may sleep */
          blk_mq_requeue_work()      /* may sleep */
          scsi_kick_queue()
            scsi_requeue_run_queue() /* may sleep */
            scsi_run_host_queues()
              scsi_ioctl_reset()     /* may sleep */
        blk_mq_insert_requests(hctx, ctx, list, run_queue_async=false)
          blk_mq_dispatch_plug_list(plug, from_sched=false)
            blk_mq_flush_plug_list(plug, from_schedule=false)
              __blk_flush_plug(plug, from_schedule=false)
      	blk_add_rq_to_plug()
      	  blk_mq_submit_bio()  /* may sleep if REQ_NOWAIT has not been set */
        blk_mq_plug_issue_direct()
          blk_mq_flush_plug_list()   /* see above */
        blk_mq_dispatch_plug_list(plug, from_sched=false)
          blk_mq_flush_plug_list()   /* see above */
        blk_mq_try_issue_directly()
          blk_mq_submit_bio()        /* may sleep if REQ_NOWAIT has not been set */
        blk_mq_try_issue_list_directly(hctx, list)
          blk_mq_insert_requests() /* see above */
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ming Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Link: https://lore.kernel.org/r/20230721172731.955724-4-bvanassche@acm.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      65a558f6
    • Bart Van Assche's avatar
      scsi: Remove a blk_mq_run_hw_queues() call · d42e2e34
      Bart Van Assche authored
      blk_mq_kick_requeue_list() calls blk_mq_run_hw_queues() asynchronously.
      Leave out the direct blk_mq_run_hw_queues() call. This patch causes
      scsi_run_queue() to call blk_mq_run_hw_queues() asynchronously instead
      of synchronously. Since scsi_run_queue() is not called from the hot I/O
      submission path, this patch does not affect the hot path.
      
      This patch prepares for allowing blk_mq_run_hw_queue() to sleep if
      BLK_MQ_F_BLOCKING has been set. scsi_run_queue() may be called from
      atomic context and must not sleep. Hence the removal of the
      blk_mq_run_hw_queues(q, false) call. See also scsi_unblock_requests().
      
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Reviewed-by: default avatar"Martin K. Petersen" <martin.petersen@oracle.com>
      Link: https://lore.kernel.org/r/20230721172731.955724-3-bvanassche@acm.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d42e2e34