All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>,
	Damien Le Moal <Damien.LeMoal@wdc.com>
Subject: Re: [PATCH 7/8] cmdprio: add mode to make the logic easier to reason about
Date: Tue, 9 Nov 2021 23:17:54 +0000	[thread overview]
Message-ID: <YYsBodZ3EPV3mBe9@x1-carbon> (raw)
In-Reply-To: <YYp3vESWV74In8Eo@x1-carbon>

On Tue, Nov 09, 2021 at 02:29:32PM +0100, Niklas Cassel wrote:
> On Tue, Nov 09, 2021 at 03:38:36PM +0900, Damien Le Moal wrote:
> > On 2021/11/09 9:28, Niklas Cassel wrote:
> > > From: Niklas Cassel <niklas.cassel@wdc.com>
> 
> The question is, if percentage == 0, for e.g. writes,
> but the user specified cmdprio=3
> (which sets cmdprio->level[] for both DDIR read and write),
> should we set the HIGH_PRIO / LOW_PRIO flag?
> 
> I think the best way is to simply not set any of the flags,
> If cmdprio percentage is 0 for a certain ddir, then everything
> will be sent with the default prio.
> 
> So I will keep the unconditional reassignment of cmdprio->class[]
> here, since it shouldn't matter. If the percentage is 0 for a ddir,
> the value should never be used anyway.
> 
> Will add a if (!p) return false;
> 
> after the p = fio_cmdprio_percentage(cmdprio, io_u);
> assignment that this patch does instead.

After further consideration, I think it is easier to just
keep the existing behavior for now.

This specific line will change in the upcoming cmdprio patch
series that adds a clat_prio array and a clat_prio_index anyway,
so let's leave this minor optimization for that point in time.

(The upcoming patch series will specify an exact ioprio, so it
will not have to deal with the HIGH/LOW flags, in the case where
we will not use the cmdprio value. So we will be able to simplify
things further at that time.)


Kind regards,
Niklas

  reply	other threads:[~2021-11-09 23:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09  0:28 [PATCH 0/8] cmdprio cleanup series Niklas Cassel
2021-11-09  0:28 ` [PATCH 1/8] docs: update cmdprio_percentage documentation Niklas Cassel
2021-11-09  6:09   ` Damien Le Moal
2021-11-09  0:28 ` [PATCH 2/8] cmdprio: move cmdprio function definitions to a new cmdprio.c file Niklas Cassel
2021-11-09  6:11   ` Damien Le Moal
2021-11-09  0:28 ` [PATCH 3/8] cmdprio: do not allocate memory for unused data direction Niklas Cassel
2021-11-09  6:12   ` Damien Le Moal
2021-11-09  0:28 ` [PATCH 4/8] io_uring: set async IO priority to td->ioprio in fio_ioring_prep() Niklas Cassel
2021-11-09  6:16   ` Damien Le Moal
2021-11-09  0:28 ` [PATCH 5/8] libaio,io_uring: rename prio_prep() to include cmdprio in the name Niklas Cassel
2021-11-09  6:19   ` Damien Le Moal
2021-11-09  0:28 ` [PATCH 6/8] libaio,io_uring: move common cmdprio_prep() code to cmdprio Niklas Cassel
2021-11-09  6:29   ` Damien Le Moal
2021-11-09 10:43     ` Niklas Cassel
2021-11-09  0:28 ` [PATCH 7/8] cmdprio: add mode to make the logic easier to reason about Niklas Cassel
2021-11-09  6:38   ` Damien Le Moal
2021-11-09 13:29     ` Niklas Cassel
2021-11-09 23:17       ` Niklas Cassel [this message]
2021-11-10  5:57       ` Damien Le Moal
2021-11-10 11:34         ` Niklas Cassel
2021-11-09  0:28 ` [PATCH 8/8] libaio,io_uring: make it possible to cleanup cmdprio malloced data 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=YYsBodZ3EPV3mBe9@x1-carbon \
    --to=niklas.cassel@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=fio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.