Re: [PATCH -next v6 1/3] block, bfq: record how many queues are busy in bfq_group

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

 



在 2022/05/28 16:18, Paolo Valente 写道:


/*
@@ -1660,6 +1678,7 @@ void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq,
	bfq_clear_bfqq_busy(bfqq);

	bfqd->busy_queues[bfqq->ioprio_class - 1]--;
+	bfq_inc_busy_queues(bfqq);


Why do you increment the number of busy queues for the group on a
del_bfqq_busy, instead of an add_bfqq_busy?
Hi, Paolo

You'are right, here should be bfq_dec_busy_queues()...

Besides, the name of the function bfq_inc_busy_queues does not mention
the target of the update, namely the group.  This creates a little
confusion at a first sight, as one sees this function invoked right
after the update of a field with the same name: bfqd->busy_queues.
Ok, that make sense, I'll move the update of 'bfqd->busy_queues' into
the new api as well.

Thanks,
Kuai

	if (bfqq->wr_coeff > 1)
		bfqd->wr_busy_queues--;
@@ -1683,6 +1702,7 @@ void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq)

	bfq_mark_bfqq_busy(bfqq);
	bfqd->busy_queues[bfqq->ioprio_class - 1]++;
+	bfq_dec_busy_queues(bfqq);

Same pair of comments as above.

Thanks,
Paolo


	if (!bfqq->dispatched)
		if (bfqq->wr_coeff == 1)
--
2.31.1


.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux