Re: [PATCH V9 00/11] blk-mq: improvement CPU hotplug

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

 



On 04/05/2020 10:07, John Garry wrote:
On 04/05/2020 09:38, Ming Lei wrote:
[67.602937]  refcount_warn_saturate+0x6c/0x13c
[67.607369]  aio_complete_rw+0x350/0x384
[67.611279]  blkdev_bio_end_io+0xc4/0x12c
[67.615276]  bio_endio+0x104/0x130
[67.618665]  blk_update_request+0x98/0x37c
[67.622748]  blk_mq_end_request+0x24/0x138
[67.626831]  blk_mq_resubmit_end_rq+0x40/0x58
[67.631174]  __blk_mq_end_request+0xb0/0x10c
[67.635432]  scsi_end_request+0xdc/0x20c
Looks an old issue, I believe the following patch can fix the issue:

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 12dee4ecd5cc..3fc79d4b2fe0 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2415,6 +2415,10 @@ static void blk_mq_resubmit_rq(struct request *rq)
      nrq->bio = rq->bio;
      nrq->biotail = rq->biotail;
+    /* Now all bios ownership is transfered to 'nrq' */
+    rq->bio = rq->biotail = NULL;
+    rq->__data_len = 0;
+
      if (blk_insert_cloned_request(nrq->q, nrq) != BLK_STS_OK)
          blk_mq_request_bypass_insert(nrq, false, true);
  }

ok, looks much better.

I'll test this a bit more now.

looks pretty solid now. I assume we'll see a v10, so please add:

Tested-by: John Garry <john.garry@xxxxxxxxxx>


cheers

.




[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