All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Block <bblock@linux.ibm.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Muneendra <muneendra.kumar@broadcom.com>,
	linux-scsi@vger.kernel.org, jsmart2021@gmail.com,
	emilne@redhat.com, mkumar@redhat.com
Subject: Re: [PATCH v2 7/8] scsi_transport_fc: Added a new sysfs attribute port_state
Date: Mon, 5 Oct 2020 10:41:53 +0200	[thread overview]
Message-ID: <20201005084153.GB8365@t480-pf1aa2c2> (raw)
In-Reply-To: <ca995d96-608b-39b9-8ded-4a6dd7598660@suse.de>

On Mon, Oct 05, 2020 at 08:49:27AM +0200, Hannes Reinecke wrote:
> On 10/2/20 6:26 PM, Benjamin Block wrote:
> > On Mon, Sep 28, 2020 at 10:20:56AM +0530, Muneendra wrote:
> > > Added a new sysfs attribute port_state under fc_transport/target*/
> > > 
> > > With this new interface the user can move the port_state from
> > > Marginal -> Online and Online->Marginal.
> > > 
> > > On Marginal :This interface will set SCMD_NORETRIES_ABORT bit in
> > > scmd->state for all the pending io's on the scsi device associated
> > > with target port.
> > > 
> > > On Online :This interface will clear SCMD_NORETRIES_ABORT bit in
> > > scmd->state for all the pending io's on the scsi device associated
> > > with target port.
> > > 
> > > Below is the interface provided to set the port state to Marginal
> > > and Online.
> > > 
> > > echo "Marginal" >> /sys/class/fc_transport/targetX\:Y\:Z/port_state
> > > echo "Online" >> /sys/class/fc_transport/targetX\:Y\:Z/port_state
> > > 
> > > Also made changes in fc_remote_port_delete,fc_user_scan_tgt,
> > > fc_timeout_deleted_rport functions  to handle the new rport state
> > > FC_PORTSTATE_MARGINAL.
> > 
> > Hey Muneendra, out of curiosity, what drives these changes to the
> > port_state in userspace, and based on what?
> > 
> > I imagine something uses the other bunch of sysfs attributes that were
> > introduced recently that get feed by FPIN notifications about congestion
> > and such, or?
> > 
> > If so, is there any plans to integrated something along the lines in
> > multipathd/multipath-tools? Or maybe I missed that.
> > 
>
> My idea here was that that 'marginal' port state is initiated by FPIN
> notifications; ideally set from the driver itself, but initially most likely
> from userspace (eg multipathd).
> 
> Problem here is that the FPIN comes in various flavours (eg congestion or
> link degradation), each of which will result in either one or several FPIN
> notifications.
> EG for link congestion it is expected to get messages at a certain frequency
> for as long as the situation occurs.
> Meaning we would have to have some sort of mechanism for checking that
> frequency, and reset the state if the condition persists.

Yeah, that makes sense.

> 
> How exactly we're going to do this, whether by external daemon or integrated
> into multipathd, is currently subject for debate and testing.
> I would prefer to have it integrated into multipathd, but it might well
> become too complex such that an external daemon might be the better option.
> 

Less "moving parts" would be great. A proper FC setup with multipath is
already a burden on many users, yet an other daemon to juggle with and
coordinate adds more to that. But I'm not doing the work rn so that's
not my choice :)

Thanks for the explanation Hannes.

-- 
Best Regards, Benjamin Block  / Linux on IBM Z Kernel Development / IBM Systems
IBM Deutschland Research & Development GmbH    /    https://www.ibm.com/privacy
Vorsitz. AufsR.: Gregor Pillen         /        Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294

  reply	other threads:[~2020-10-05  8:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28  4:50 [PATCH v2 0/8] scsi: Support to handle Intermittent errors Muneendra
2020-09-28  4:50 ` [PATCH v2 1/8] scsi: Added a new definition in scsi_cmnd.h Muneendra
2020-09-30  9:17   ` Hannes Reinecke
2020-09-28  4:50 ` [PATCH v2 2/8] scsi: Added a new error code in scsi.h Muneendra
2020-09-30  9:17   ` Hannes Reinecke
2020-09-28  4:50 ` [PATCH v2 3/8] scsi: Clear state bit SCMD_NORETRIES_ABORT of scsi_cmd before start request Muneendra
2020-09-30  9:19   ` Hannes Reinecke
2020-09-28  4:50 ` [PATCH v2 4/8] scsi: No retries on abort success Muneendra
2020-09-30  9:27   ` Hannes Reinecke
2020-09-28  4:50 ` [PATCH v2 5/8] scsi: Added routine to set/clear SCMD_NORETRIES_ABORT bit for outstanding io on scsi_dev Muneendra
2020-09-30  9:26   ` Hannes Reinecke
2020-09-28  4:50 ` [PATCH v2 6/8] scsi_transport_fc: Added a new rport state FC_PORTSTATE_MARGINAL Muneendra
2020-09-30  9:30   ` Hannes Reinecke
2020-09-28  4:50 ` [PATCH v2 7/8] scsi_transport_fc: Added a new sysfs attribute port_state Muneendra
2020-09-30  9:33   ` Hannes Reinecke
2020-10-01 13:13     ` Muneendra Kumar M
2020-10-05  9:18     ` Muneendra Kumar M
2020-10-05  9:29       ` Hannes Reinecke
2020-10-07  7:14         ` Muneendra Kumar M
2020-10-02 16:26   ` Benjamin Block
2020-10-05  6:49     ` Hannes Reinecke
2020-10-05  8:41       ` Benjamin Block [this message]
2020-09-28  4:50 ` [PATCH v2 8/8] lpfc: Added support to handle marginal state Muneendra
2020-09-30  9:36   ` Hannes Reinecke
2020-09-30 11:33     ` Muneendra Kumar M
2020-09-30 11:50       ` Hannes Reinecke
2020-10-01  8:59         ` Muneendra Kumar M
2020-10-02 17:01 ` [PATCH v2 0/8] scsi: Support to handle Intermittent errors Mike Christie
2020-10-02 17:27   ` James Smart

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=20201005084153.GB8365@t480-pf1aa2c2 \
    --to=bblock@linux.ibm.com \
    --cc=emilne@redhat.com \
    --cc=hare@suse.de \
    --cc=jsmart2021@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkumar@redhat.com \
    --cc=muneendra.kumar@broadcom.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.