Re: [PATCH -next V2] blk-mq: fix tag_get wait task can't be awakened

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

 



On 05/01/2022 03:56, Laibin Qiu wrote:
+
  /*
   * If a previously inactive queue goes active, bump the active user count.
   * We need to do this before try to allocate driver tag, then even if fail
@@ -23,10 +38,16 @@
   */
  bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx)
  {
+	unsigned int users;
+
  	if (!test_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state) &&
-	    !test_and_set_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state))
+	    !test_and_set_bit(BLK_MQ_S_TAG_ACTIVE, &hctx->state)) {
  		atomic_inc(&hctx->tags->active_queues);
+ users = atomic_read(&hctx->tags->active_queues);
+		blk_mq_update_wake_batch(hctx->tags, users);
+	}
+
  	return true;
  }

This code looks old to me. Which baseline is used here?

Thanks,
John



[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