Re: [PATCH v5 0/3] blk-mq: Fix a race between iterating over requests and freeing requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/04/2021 01:28, Bart Van Assche wrote:
Hi Jens,

This patch series fixes the race between iterating over requests and
freeing requests that has been reported by multiple different users over
the past two years. Please consider this patch series for kernel v5.13.

Thank you,

Bart.

Changes between v4 and v5:
- Addressed Khazhy's review comments. Note: the changes that have been made
   in v5 only change behavior in case CONFIG_PROVE_RCU=y.

Changes between v3 and v4:
- Fixed support for tag sets shared across hardware queues.
- Renamed blk_mq_wait_for_tag_readers() into blk_mq_wait_for_tag_iter().
- Removed the fourth argument of blk_mq_queue_tag_busy_iter() again.


Hi Bart,

Changes between v2 and v3:
- Converted the single v2 patch into a series of three patches.
- Switched from SRCU to a combination of RCU and semaphores.


But can you mention why we made to changes from v3 onwards (versus v2)?

The v2 patch just used SRCU as the sync mechanism, and the impression I got from Jens was that the marginal performance drop was tolerable. And the issues it tries to address seem to be solved. So why change? Maybe my impression of the performance drop being acceptable was wrong.

Thanks,
John

Ps. I have been on vacation for some time, so could not support this work.

Changes between v1 and v2:
- Reformatted patch description.
- Added Tested-by/Reviewed-by tags.
- Changed srcu_barrier() calls into synchronize_srcu() calls.

Bart Van Assche (3):
   blk-mq: Move the elevator_exit() definition
   blk-mq: Introduce atomic variants of the tag iteration functions
   blk-mq: Fix a race between iterating over requests and freeing
     requests

  block/blk-core.c          | 34 ++++++++++++++++-
  block/blk-mq-tag.c        | 79 ++++++++++++++++++++++++++++++++++-----
  block/blk-mq-tag.h        |  6 ++-
  block/blk-mq.c            | 23 +++++++++---
  block/blk-mq.h            |  1 +
  block/blk.h               | 11 +-----
  block/elevator.c          |  9 +++++
  drivers/scsi/hosts.c      | 16 ++++----
  drivers/scsi/ufs/ufshcd.c |  4 +-
  include/linux/blk-mq.h    |  2 +
  10 files changed, 149 insertions(+), 36 deletions(-)

.





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux