From: Bart Van Assche <bvanassche@acm.org>
To: Damien Le Moal <Damien.LeMoal@wdc.com>, Jens Axboe <axboe@kernel.dk>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>, Jaegeuk Kim <jaegeuk@kernel.org>,
Niklas Cassel <Niklas.Cassel@wdc.com>,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH 4/4] block/mq-deadline: Prioritize high-priority requests
Date: Mon, 27 Sep 2021 13:03:30 -0700 [thread overview]
Message-ID: <7004e87b-a2f0-34e6-42aa-3a9849024f98@acm.org> (raw)
In-Reply-To: <DM6PR04MB708107091FD22BC145EDB340E7A49@DM6PR04MB7081.namprd04.prod.outlook.com>
On 9/24/21 4:08 AM, Damien Le Moal wrote:
> On 2021/09/24 8:27, Bart Van Assche wrote:
>> +/*
>> + * Time after which to dispatch lower priority requests even if higher
>> + * priority requests are pending.
>> + */
>> +static const int aging_expire = 10 * HZ;
>
> What about calling this prio_starved, to be consistent with writes_starved ?
> Or at least let's call it prio_aging_expire to show that it is for priority
> levels, and not for requests within a priority queue.
The name 'prio_starved' probably would cause confusion since this parameter
represents a timeout while 'writes_starved' represents a count. I will rename
it into prio_aging_expire.
>> dispatch_request:
>> + if (started_after(dd, rq, latest_start))
>> + return NULL;
>
> Nit: add a blank line here ? (for aesthetic :))
Will do.
>> +/*
>> + * Check whether there are any requests with a deadline that expired more than
>> + * aging_expire jiffies ago.
>
> Hmm... requests do not have a "deadline", so this is a little hard to
> understand. What about something like this:
>
> * Check whether there are any requests at a low priority level inserted
> * more than aging_expire jiffies ago.
Agreed, I will clarify this comment.
>> + */
>> +static struct request *dd_dispatch_aged_requests(struct deadline_data *dd,
>> + unsigned long now)
>
> Same remark as for the aging_expire variable: it may be good to have prio in the
> name of this function. Something like:
>
> dd_dispatch_prio_starved_requests() ?
The name 'aging' has a well-defined meaning so I would like to keep it. See also
https://en.wikipedia.org/wiki/Aging_(scheduling).
>> spin_lock(&dd->lock);
>
> Nit: Add a blank line here to have the spin_lock() stand out ?
> Easier to notice it that way...
The convention in kernel code is a blank line above statements that grab a lock
but not below these statements.
Thanks,
Bart.
next prev parent reply other threads:[~2021-09-27 20:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 23:23 [PATCH 0/4] Restore I/O priority support in the mq-deadline scheduler Bart Van Assche
2021-09-23 23:26 ` [PATCH 1/4] block/mq-deadline: Improve request accounting further Bart Van Assche
2021-09-23 23:26 ` [PATCH 2/4] block/mq-deadline: Add an invariant check Bart Van Assche
2021-09-24 10:54 ` Damien Le Moal
2021-09-27 15:53 ` Niklas Cassel
2021-09-23 23:26 ` [PATCH 3/4] block/mq-deadline: Stop using per-CPU counters Bart Van Assche
2021-09-24 10:58 ` Damien Le Moal
2021-09-25 2:59 ` Bart Van Assche
2021-09-27 0:19 ` Damien Le Moal
2021-09-27 2:38 ` Bart Van Assche
2021-09-27 3:41 ` Damien Le Moal
2021-09-27 15:53 ` Niklas Cassel
2021-09-23 23:26 ` [PATCH 4/4] block/mq-deadline: Prioritize high-priority requests Bart Van Assche
2021-09-24 11:08 ` Damien Le Moal
2021-09-27 20:03 ` Bart Van Assche [this message]
2021-09-24 10:54 ` [PATCH 1/4] block/mq-deadline: Improve request accounting further Damien Le Moal
2021-09-27 15:53 ` Niklas Cassel
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=7004e87b-a2f0-34e6-42aa-3a9849024f98@acm.org \
--to=bvanassche@acm.org \
--cc=Damien.LeMoal@wdc.com \
--cc=Niklas.Cassel@wdc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jaegeuk@kernel.org \
--cc=linux-block@vger.kernel.org \
/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