The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block <linux-block@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Arie van der Hoeven <arie.vanderhoeven@seagate.com>,
	Rory Chen <rory.c.chen@seagate.com>,
	Glen Valante <glen.valante@linaro.org>,
	Gabriele Felici <felicigb@gmail.com>,
	Carmine Zaccagnino <carmine@carminezacc.com>
Subject: Re: [PATCH V10 1/8] block, bfq: split sync bfq_queues on a per-actuator basis
Date: Wed, 21 Dec 2022 09:50:37 +0900	[thread overview]
Message-ID: <eb58939f-567e-c0c1-bafb-383f18f3d58e@opensource.wdc.com> (raw)
In-Reply-To: <60582F89-8020-4468-80FE-BC52202D1129@linaro.org>

On 2022/12/20 22:10, Paolo Valente wrote:
>>> -	/*
>>> -	 * Does queue (or any parent entity) exceed number of requests that
>>> -	 * should be available to it? Heavily limit depth so that it cannot
>>> -	 * consume more available requests and thus starve other entities.
>>> -	 */
>>> -	if (bfqq && bfqq_request_over_limit(bfqq, limit))
>>> -		depth = 1;
>>> +	for (act_idx = 0; act_idx < bfqd->num_actuators; act_idx++) {
>>> +		struct bfq_queue *bfqq =
>>> +			bic ? bic_to_bfqq(bic, op_is_sync(opf), act_idx) : NULL;
>>
>> Commented already: why not add a "if (!bfqq) return NULL;" in
>> bic_to_bfqq() ?
> 
> You have probably missed my reply on this.  The problem is that your
> proposal would improve code (only) here, but it would entail the above
> control for all the other invocations, for which it is useless :(

But then you have *a lot* of "if (bfqd)" tests that are useless elsewhere since
bic_to_bfqq() never returns NULL.

And for this line, I personally would prefer seeing something like:

		struct bfq_queue *bfqq;


		if (bic)
			bfqd = bic_to_bfqq(bic, op_is_sync(opf), act_idx)
		else
			bfqd = NULL;

Which is a lot simpler to read.


-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2022-12-21  0:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09  9:44 [PATCH V10 0/8] block, bfq: extend bfq to support multi-actuator drives Paolo Valente
2022-12-09  9:44 ` [PATCH V10 1/8] block, bfq: split sync bfq_queues on a per-actuator basis Paolo Valente
2022-12-16  0:00   ` Damien Le Moal
2022-12-20 13:10     ` Paolo Valente
2022-12-21  0:50       ` Damien Le Moal [this message]
2022-12-21 10:13         ` Paolo Valente
2022-12-21 10:30           ` Paolo Valente
2022-12-09  9:44 ` [PATCH V10 2/8] block, bfq: forbid stable merging of queues associated with different actuators Paolo Valente
2022-12-09  9:44 ` [PATCH V10 3/8] block, bfq: move io_cq-persistent bfqq data into a dedicated struct Paolo Valente
2022-12-09  9:44 ` [PATCH V10 4/8] block, bfq: turn bfqq_data into an array in bfq_io_cq Paolo Valente
2022-12-09  9:44 ` [PATCH V10 5/8] block, bfq: split also async bfq_queues on a per-actuator basis Paolo Valente
2022-12-09  9:44 ` [PATCH V10 6/8] block, bfq: retrieve independent access ranges from request queue Paolo Valente
2022-12-09  9:44 ` [PATCH V10 7/8] block, bfq: inject I/O to underutilized actuators Paolo Valente
2022-12-09  9:44 ` [PATCH V10 8/8] block, bfq: balance I/O injection among " Paolo Valente
2022-12-16  1:36   ` Damien Le Moal
2022-12-13 15:40 ` [PATCH V10 0/8] block, bfq: extend bfq to support multi-actuator drives Paolo Valente
2022-12-13 15:43   ` Jens Axboe
2022-12-13 17:10     ` Arie van der Hoeven
2022-12-13 17:17       ` Jens Axboe
2022-12-15 15:04         ` Paolo Valente
2022-12-15 15:12           ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb58939f-567e-c0c1-bafb-383f18f3d58e@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=arie.vanderhoeven@seagate.com \
    --cc=axboe@kernel.dk \
    --cc=carmine@carminezacc.com \
    --cc=felicigb@gmail.com \
    --cc=glen.valante@linaro.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    --cc=rory.c.chen@seagate.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox