Skip to content
Snippets Groups Projects
  1. Feb 16, 2023
    • Jinke Han's avatar
      block: Fix io statistics for cgroup in throttle path · 0f7c8f0f
      Jinke Han authored
      
      In the current code, io statistics are missing for cgroup when bio
      was throttled by blk-throttle. Fix it by moving the unreaching code
      to submit_bio_noacct_nocheck.
      
      Fixes: 3f98c753 ("block: don't check bio in blk_throtl_dispatch_work_fn")
      Signed-off-by: default avatarJinke Han <hanjinke.666@bytedance.com>
      Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
      Acked-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Link: https://lore.kernel.org/r/20230216032250.74230-1-hanjinke.666@bytedance.com
      
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0f7c8f0f
    • Jens Axboe's avatar
      brd: mark as nowait compatible · 67205f80
      Jens Axboe authored
      By default, non-mq drivers do not support nowait. This causes io_uring
      to use a slower path as the driver cannot be trust not to block. brd
      can safely set the nowait flag, as worst case all it does is a NOIO
      allocation.
      
      For io_uring, this makes a substantial difference. Before:
      
      submitter=0, tid=453, file=/dev/ram0, node=-1
      polled=0, fixedbufs=1/0, register_files=1, buffered=0, QD=128
      Engine=io_uring, sq_ring=128, cq_ring=128
      IOPS=440.03K, BW=1718MiB/s, IOS/call=32/31
      IOPS=428.96K, BW=1675MiB/s, IOS/call=32/32
      IOPS=442.59K, BW=1728MiB/s, IOS/call=32/31
      IOPS=419.65K, BW=1639MiB/s, IOS/call=32/32
      IOPS=426.82K, BW=1667MiB/s, IOS/call=32/31
      
      and after:
      
      submitter=0, tid=354, file=/dev/ram0, node=-1
      polled=0, fixedbufs=1/0, register_files=1, buffered=0, QD=128
      Engine=io_uring, sq_ring=128, cq_ring=128
      IOPS=3.37M, BW=13.15GiB/s, IOS/call=32/31
      IOPS=3.45M, BW=13.46GiB/s, IOS/call=32/31
      IOPS=3.43M, BW=13.42GiB/s, IOS/call=32/32
      IOPS=3.43M, BW=13.39GiB/s, IOS/call=32/31
      IOPS=3.43M, BW=13.38GiB/s, IOS/call=32/31
      
      or about an 8x in difference. Now that brd is prepared to deal with
      REQ_NOWAIT reads/writes, mark it as supporting that.
      
      Cc: stable@vger.kernel.org # 5.10+
      Link: https://lore.kernel.org/linux-block/20230203103005.31290-1-p.raghav@samsung.com/
      
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      67205f80
    • Jens Axboe's avatar
      brd: check for REQ_NOWAIT and set correct page allocation mask · 6ded703c
      Jens Axboe authored
      
      If REQ_NOWAIT is set, then do a non-blocking allocation if the operation
      is a write and we need to insert a new page. Currently REQ_NOWAIT cannot
      be set as the queue isn't marked as supporting nowait, this change is in
      preparation for allowing that.
      
      radix_tree_preload() warns on attempting to call it with an allocation
      mask that doesn't allow blocking. While that warning could arguably
      be removed, we need to handle radix insertion failures anyway as they
      are more likely if we cannot block to get memory.
      
      Remove legacy BUG_ON()'s and turn them into proper errors instead, one
      for the allocation failure and one for finding a page that doesn't
      match the correct index.
      
      Cc: stable@vger.kernel.org # 5.10+
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      6ded703c
    • Jens Axboe's avatar
      brd: return 0/-error from brd_insert_page() · db0ccc44
      Jens Axboe authored
      
      It currently returns a page, but callers just check for NULL/page to
      gauge success. Clean this up and return the appropriate error directly
      instead.
      
      Cc: stable@vger.kernel.org # 5.10+
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      db0ccc44
    • Ming Lei's avatar
      block: sync mixed merged request's failfast with 1st bio's · 3ce6a115
      Ming Lei authored
      
      We support mixed merge for requests/bios with different fastfail
      settings. When request fails, each time we only handle the portion
      with same failfast setting, then bios with failfast can be failed
      immediately, and bios without failfast can be retried.
      
      The idea is pretty good, but the current implementation has several
      defects:
      
      1) initially RA bio doesn't set failfast, however bio merge code
      doesn't consider this point, and just check its failfast setting for
      deciding if mixed merge is required. Fix this issue by adding helper
      of bio_failfast().
      
      2) when merging bio to request front, if this request is mixed
      merged, we have to sync request's faifast setting with 1st bio's
      failfast. Fix it by calling blk_update_mixed_merge().
      
      3) when merging bio to request back, if this request is mixed
      merged, we have to mark the bio as failfast, because blk_update_request
      simply updates request failfast with 1st bio's failfast. Fix
      it by calling blk_update_mixed_merge().
      
      Fixes one normal EXT4 READ IO failure issue, because it is observed
      that the normal READ IO is merged with RA IO, and the mixed merged
      request has different failfast setting with 1st bio's, so finally
      the normal READ IO doesn't get retried.
      
      Cc: Tejun Heo <tj@kernel.org>
      Fixes: 80a761fd ("block: implement mixed merge of different failfast requests")
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20230209125527.667004-1-ming.lei@redhat.com
      
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3ce6a115
  2. Feb 15, 2023
  3. Feb 14, 2023
  4. Feb 13, 2023
  5. Feb 10, 2023
  6. Feb 09, 2023
  7. Feb 08, 2023
  8. Feb 07, 2023
  9. Feb 06, 2023
Loading