linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Valente <paolo.valente@linaro.org>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>
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>,
	Gabriele Felici <felicigb@gmail.com>,
	Gianmarco Lusvardi <glusvardi@posteo.net>,
	Giulio Barabino <giuliobarabino99@gmail.com>,
	Emiliano Maccaferri <inbox@emilianomaccaferri.com>
Subject: Re: [PATCH V6 4/8] block, bfq: turn bfqq_data into an array in bfq_io_cq
Date: Tue, 6 Dec 2022 09:00:22 +0100	[thread overview]
Message-ID: <9548A61A-7DEA-4FB2-85AE-0B75417B4B9E@linaro.org> (raw)
In-Reply-To: <3ec70cff-f1bc-1a45-a4db-10bb1d0e6266@opensource.wdc.com>



> Il giorno 21 nov 2022, alle ore 01:39, Damien Le Moal <damien.lemoal@opensource.wdc.com> ha scritto:
...
>> 
>> 			bfqq = bfq_split_bfqq(bic, bfqq);
>> 			split = true;
>> diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
>> index f2e8ab91951c..e27897d66a0f 100644
>> --- a/block/bfq-iosched.h
>> +++ b/block/bfq-iosched.h
>> @@ -416,7 +416,7 @@ struct bfq_queue {
>> struct bfq_iocq_bfqq_data {
>> 	/*
>> 	 * Snapshot of the has_short_time flag before merging; taken
>> -	 * to remember its value while the queue is merged, so as to
>> +	 * to remember its values while the queue is merged, so as to
>> 	 * be able to restore it in case of split.
>> 	 */
>> 	bool saved_has_short_ttime;
>> @@ -430,7 +430,7 @@ struct bfq_iocq_bfqq_data {
>> 	u64 saved_tot_idle_time;
>> 
>> 	/*
>> -	 * Same purpose as the previous fields for the value of the
>> +	 * Same purpose as the previous fields for the values of the
>> 	 * field keeping the queue's belonging to a large burst
>> 	 */
>> 	bool saved_in_large_burst;
>> @@ -493,8 +493,12 @@ struct bfq_io_cq {
>> 	uint64_t blkcg_serial_nr; /* the current blkcg serial */
>> #endif
>> 
>> -	/* persistent data for associated synchronous process queue */
>> -	struct bfq_iocq_bfqq_data bfqq_data;
>> +	/*
>> +	 * Persistent data for associated synchronous process queues
>> +	 * (one queue per actuator, see field bfqq above). In
>> +	 * particular, each of these queues may undergo a merge.
>> +	 */
>> +	struct bfq_iocq_bfqq_data bfqq_data[BFQ_MAX_ACTUATORS];
> 
> I wonder if packing this together with struct bfq_queue would be cleaner.
> That would avoid the 2 arrays you have in this struct. Something like this:
> 
> struct bfq_queue_data {
> 	struct bfq_queue 	*bfqq[2];
> 	struct bfq_iocq_bfqq_data iocq_data;
> }
> 
> struct bfq_io_cq {
> 	...
> 	struct bfq_queue_data bfqqd[BFQ_MAX_ACTUATORS];
> 	...
> }
> 
> Thinking aloud here. That may actually make the code more complicated.

I see your point, but, yes, this change would entail one more
indirection when accessing queues from io contexts.

Apart from this, I have applied all of your other suggestions here.

Thanks,
Paolo

> 
>> 
>> 	unsigned int requests;	/* Number of requests this process has in flight */
>> };
> 
> -- 
> Damien Le Moal
> Western Digital Research


  reply	other threads:[~2022-12-06  8:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 16:26 [PATCH V6 0/8] block, bfq: extend bfq to support multi-actuator drives Paolo Valente
2022-11-03 16:26 ` [PATCH V6 1/8] block, bfq: split sync bfq_queues on a per-actuator basis Paolo Valente
2022-11-21  0:18   ` Damien Le Moal
2022-11-26 16:28     ` Paolo Valente
2022-11-28 14:32       ` Jens Axboe
2022-12-06  8:04     ` Paolo Valente
2022-11-03 16:26 ` [PATCH V6 2/8] block, bfq: forbid stable merging of queues associated with different actuators Paolo Valente
2022-11-21  0:20   ` Damien Le Moal
2022-11-03 16:26 ` [PATCH V6 3/8] block, bfq: move io_cq-persistent bfqq data into a dedicated struct Paolo Valente
2022-11-21  0:24   ` Damien Le Moal
2022-11-03 16:26 ` [PATCH V6 4/8] block, bfq: turn bfqq_data into an array in bfq_io_cq Paolo Valente
2022-11-21  0:39   ` Damien Le Moal
2022-12-06  8:00     ` Paolo Valente [this message]
2022-11-03 16:26 ` [PATCH V6 5/8] block, bfq: split also async bfq_queues on a per-actuator basis Paolo Valente
2022-11-21  0:52   ` Damien Le Moal
2022-11-03 16:26 ` [PATCH V6 6/8] block, bfq: retrieve independent access ranges from request queue Paolo Valente
2022-11-21  1:01   ` Damien Le Moal
2022-12-06  8:06     ` Paolo Valente
2022-12-06  8:29       ` Damien Le Moal
2022-12-06  8:41         ` Paolo Valente
2022-12-06  9:02           ` Damien Le Moal
2022-12-06 15:43             ` Paolo Valente
2022-12-06 23:34               ` Damien Le Moal
2022-12-08 10:43                 ` Paolo Valente
2022-11-03 16:26 ` [PATCH V6 7/8] block, bfq: inject I/O to underutilized actuators Paolo Valente
2022-11-21  1:17   ` Damien Le Moal
2022-11-03 16:26 ` [PATCH V6 8/8] block, bfq: balance I/O injection among " Paolo Valente
2022-11-10 15:25   ` Arie van der Hoeven
2022-11-20  7:29     ` Paolo Valente
2022-11-20 22:06       ` Jens Axboe
2022-11-20 23:41         ` Damien Le Moal

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=9548A61A-7DEA-4FB2-85AE-0B75417B4B9E@linaro.org \
    --to=paolo.valente@linaro.org \
    --cc=arie.vanderhoeven@seagate.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=felicigb@gmail.com \
    --cc=giuliobarabino99@gmail.com \
    --cc=glusvardi@posteo.net \
    --cc=inbox@emilianomaccaferri.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).