linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hare@suse.de (Hannes Reinecke)
Subject: [PATCHv2 08/11] nvme: add ANA support
Date: Fri, 25 May 2018 16:32:41 +0200	[thread overview]
Message-ID: <20180525163241.164fd83f@pentland.suse.de> (raw)
In-Reply-To: <20180525132840.GB24601@lst.de>

On Fri, 25 May 2018 15:28:40 +0200
Christoph Hellwig <hch@lst.de> wrote:

> On Tue, May 22, 2018@11:10:01AM +0200, Hannes Reinecke wrote:
> > From: Christoph Hellwig <hch at lst.de>
> > 
> > Adding sypport for Asymmetric Namespace Access (ANA)
> > 
> > Signed-off-by: Christoph Hellwig <hch at lst.de>
> > Signed-off-by: Hannes Reinecke <hare at suse.com>  
> 
> I just did a quick diff, and this really doesn't look like my
> old code.  Quick difference I spotted:
> 
>  - lots of code in core.c instead of multipath.c, where it should
>    be
>  - adds a per-ns ana_state value, including all the crap to main
>    it instead of the simple per-controller state table
>  - fucks of the sysfs attributes to also who on the multipath
>    node, where they can't work, and probably even corrupt
>    memory
>  - adds a get_log_page call per namespace, which is completely
>    counter to the ANA design to not have craptons of roundtrip
> 
> And probably a few more things I didn't notice due to all the code
> moves.
> 
Okay, will be moving back to storing the ana state in the
per-controller buffer.

> > ---
> >  drivers/nvme/host/core.c      | 335
> > +++++++++++++++++++++++++++++++++++++++---
> > drivers/nvme/host/multipath.c |  41 +++++-
> > drivers/nvme/host/nvme.h      |  17 +++ 3 files changed, 366
> > insertions(+), 27 deletions(-)
> > 
> > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> > index b4408e1e677f..0d8167c68dff 100644
> > --- a/drivers/nvme/host/core.c
> > +++ b/drivers/nvme/host/core.c
> > @@ -68,6 +68,10 @@ static bool streams;
> >  module_param(streams, bool, 0644);
> >  MODULE_PARM_DESC(streams, "turn on support for Streams write
> > directives"); 
> > +static unsigned long ana_log_delay = 500;
> > +module_param(ana_log_delay, ulong, 0644);
> > +MODULE_PARM_DESC(ana_log_delay, "Delay in msecs before retrieving
> > ANA log");  
> 
> Why?  There really is no point in delaying reading the state
> information and just messing things up.

This delay will be used if we fail to get the ANA log page; in that
case we _should_ be retrying it.
The amount of retries need to be capped (hence ana_log_retries), and we
shouldn't retry immediately to give the target (and possibly lower
layers) a chance to recover (that's what ana_log_delay is for).

If you don't like having them as module parameters, fine, I can make
them as #define or something.

Cheers,

Hannes

  reply	other threads:[~2018-05-25 14:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22  9:09 [PATCHv2 00/11] nvme: ANA support Hannes Reinecke
2018-05-22  9:09 ` [PATCHv2 01/11] nvme.h: untangle AEN notice definitions Hannes Reinecke
2018-05-22  9:09 ` [PATCHv2 02/11] nvme: submit AEN event configuration on startup Hannes Reinecke
2018-05-22 10:00   ` Christoph Hellwig
2018-05-22 10:55     ` Hannes Reinecke
2018-05-22  9:09 ` [PATCHv2 03/11] nvmet: refactor AER handling Hannes Reinecke
2018-05-22  9:09 ` [PATCHv2 04/11] nvmet: Add AEN configuration support Hannes Reinecke
2018-05-22 10:01   ` Christoph Hellwig
2018-05-22 10:56     ` Hannes Reinecke
2018-05-22  9:09 ` [PATCHv2 05/11] nvme.h: add ANA definitions Hannes Reinecke
2018-05-22  9:09 ` [PATCHv2 06/11] nvme: add support for the log specific field Hannes Reinecke
2018-05-22  9:10 ` [PATCHv2 07/11] nvme: always failover on path or transport errors Hannes Reinecke
2018-05-25 13:24   ` Christoph Hellwig
2018-05-22  9:10 ` [PATCHv2 08/11] nvme: add ANA support Hannes Reinecke
2018-05-23 11:52   ` Popuri, Sriram
2018-05-23 13:19     ` Hannes Reinecke
2018-05-25 13:31     ` Christoph Hellwig
2018-05-25 13:28   ` Christoph Hellwig
2018-05-25 14:32     ` Hannes Reinecke [this message]
2018-05-31 10:21   ` Sagi Grimberg
2018-05-22  9:10 ` [PATCHv2 09/11] nvmet: add a new nvmet_zero_sgl helper Hannes Reinecke
2018-05-22  9:10 ` [PATCHv2 10/11] nvmet: split log page implementation Hannes Reinecke
2018-05-22  9:10 ` [PATCHv2 11/11] nvmet: ANA support Hannes Reinecke
2018-05-22 10:05   ` Christoph Hellwig
2018-05-22 11:05     ` Hannes Reinecke
2018-05-25 13:34       ` Christoph Hellwig
2018-05-31 10:27         ` Sagi Grimberg

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=20180525163241.164fd83f@pentland.suse.de \
    --to=hare@suse.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).