linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 2/2] nvme-multipath: round-robin I/O policy
Date: Wed, 21 Nov 2018 09:28:46 +0100	[thread overview]
Message-ID: <20181121082846.GB29231@lst.de> (raw)
In-Reply-To: <84110e63-463b-807d-55b9-1a03ea7b61ff@suse.de>

On Tue, Nov 20, 2018@09:30:32PM +0100, Hannes Reinecke wrote:
>> So you never consider non-optimized paths here?
>>
> Yes, correct. Two reasons:
> - We try to optimize for performance. Selecting a non-optimized path per 
> definition doesn't provide that.
> - The selection algorithm becomes overly complex, and will require an even 
> more complex mechanism to figure out at which point the use of a 
> non-optimized path become feasible.

We can still have a system where we don't see any optimized path at all,
so you will need some kind of fallback.

>> Can you move the __nvme_find_path call for the first path into
>> your round robing helper so that we can make this whole thing
>> a little cleaner?  E.g.
>>
>> 	if (head->subsys->iopolicy == NVME_IOPOLICY_RR)
>> 		return nvme_round_robin_path(head, node);
>>   	if (unlikely(!ns || !nvme_path_is_optimized(ns)))
>> 		ns = __nvme_find_path(head, node);
>> 	return ns;
>> Actually this order was by design.
> By ordering it _after_ __nvme_find_path() we guarantee that the first round 
> found an optimal path, and so we can continue selecting the next optimal 
> path.
> So this ordering would break the assumptions I did when implementing it.
> But I'll have a look to see if that can't be lifted.

You can keep the __nvme_find_path for round robin, I just want it moved
into the round robin helper, so that the main function stays nice and tidy.

  reply	other threads:[~2018-11-21  8:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 12:29 [PATCH 0/2] nvme-multipath: round-robin I/O policy Hannes Reinecke
2018-11-15 12:29 ` [PATCH 1/2] nvme-multipath: add 'iopolicy' subsystem attribute Hannes Reinecke
2018-11-15 17:35   ` Sagi Grimberg
2018-11-16  8:07     ` Hannes Reinecke
2018-11-15 12:29 ` [PATCH 2/2] nvme-multipath: round-robin I/O policy Hannes Reinecke
2018-11-20 16:42   ` Christoph Hellwig
2018-11-20 20:30     ` Hannes Reinecke
2018-11-21  8:28       ` Christoph Hellwig [this message]
2018-11-21 11:24         ` Hannes Reinecke
     [not found]       ` <8a583536-151e-6f68-f4f9-98d8c4b853dd@broadcom.com>
2018-11-21 11:09         ` Hannes Reinecke
2018-11-22 13:52         ` Hannes Reinecke
2018-11-16  8:26 ` [PATCH 0/2] " Christoph Hellwig
2018-11-20 16:02   ` Hannes Reinecke
2018-11-20 16:19     ` Christoph Hellwig
2018-12-05 20:05 ` Ewan D. Milne

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=20181121082846.GB29231@lst.de \
    --to=hch@lst.de \
    /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).