All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sitsofe Wheeler <sitsofe@gmail.com>
To: Brandon Schwartz <schwartz.xn@gmail.com>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: NCQ Priority Support and FIO
Date: Fri, 8 Sep 2017 07:20:41 +0100	[thread overview]
Message-ID: <CALjAwxgAuHfPu_jq8pLoha5jX2MXVcof1NyE-9XsnQKK+3QVVA@mail.gmail.com> (raw)
In-Reply-To: <CADAGN7XhtCCJotMXjimEYYR47YAshyP=ymDNaFNSaNhF_00wEg@mail.gmail.com>

Hi,

On 5 September 2017 at 19:45, Brandon Schwartz <schwartz.xn@gmail.com> wrote:
>
> Building off of the above change to control the priority bit, I'm
> trying to add the ability to track completion latencies for high and
> low prio read commands separately, but I'm not sure what I added to FIO is
> exactly correct.  It seems to be very accurate for qdepths up to 8,
> but at 16 and 32 I start seeing the FIO output for the high prio
> commands be higher than what I see when I take a bus trace and parse
> that (low prio latencies are what I would expect however).  What I am
> trying to do is track the priority of the IO when it is set in
> libaio.c via the following (notice the io_us[0]->priorityBit
> additions):
>
> https://github.com/brschwartz/fio/blob/10fdb93663e52beefa1f5dd836927d1e85c354d7/engines/libaio.c#L280

This is going to get confusing fast as you are changing the priority
of the fio thread/process periodically rather than tagging the I/O
with a priority which it keeps until completion. Are you saying
batches of I/O all have the same priority and if so why aren't you
tagging all the I/Os that comprise your batch? What if you submit an
I/O then while waiting for completion you send another I/O off but
change your I/O priority - what does that mean for the first I/O when
it completes? My understanding is that ioprio_set only controls CFQ
I/O scheduler priorities and nothing else BTW (Jens said you would
need a new kernel interface to pass NCQ priorities from fio over on
https://www.spinics.net/lists/fio/msg06102.html ).

> rand()%100

You may want to use fio's pseudorandom generator. See
get_rand_file_size() in filesetup.c for an example.

> And then I grab that value again when the IO is complete and add the
> associated latency to high and low prio read data structures which
> then get outputted in the json output.
>
> https://github.com/brschwartz/fio/commit/b7ad9003feb83fca57ec7438f5532426f597cec6
> https://github.com/brschwartz/fio/blob/10fdb93663e52beefa1f5dd836927d1e85c354d7/stat.c#L1056
>
> Does this seem right?  Or should I be tracking it a different way?
> Thanks for any help/input!

I find the premise a bit confusing because unless you're using
direct=1 coupled with the appropriate batch options
(http://fio.readthedocs.io/en/latest/fio_doc.html#i-o-depth ) so you
maintain the same priority across the whole lifetime of an I/O.
Without at least that you don't know if the I/Os are sitting in a
queue in while you repeatedly flip priorities of the thread/process
and at that point what priority should the completed I/O be attributed
to?

-- 
Sitsofe | http://sucs.org/~sits/

      reply	other threads:[~2017-09-08  6:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 22:29 NCQ Priority Support and FIO Brandon Schwartz
2017-02-02 22:36 ` Sitsofe Wheeler
2017-02-04  0:03   ` Brandon Schwartz
2017-02-04  7:37     ` Sitsofe Wheeler
2017-04-08  9:06       ` Sitsofe Wheeler
2017-09-05 18:45         ` Brandon Schwartz
2017-09-08  6:20           ` Sitsofe Wheeler [this message]

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=CALjAwxgAuHfPu_jq8pLoha5jX2MXVcof1NyE-9XsnQKK+3QVVA@mail.gmail.com \
    --to=sitsofe@gmail.com \
    --cc=fio@vger.kernel.org \
    --cc=schwartz.xn@gmail.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 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.