From: Steffen Maier <maier@linux.ibm.com>
To: "Seymour, Shane M" <shane.seymour@hpe.com>,
Greg KH <gregkh@linuxfoundation.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH for-next] scsi: Implement host state statistics
Date: Fri, 17 Mar 2023 17:52:40 +0100 [thread overview]
Message-ID: <8f17a884-09d2-b6a1-7ced-77dd4b4f21a5@linux.ibm.com> (raw)
In-Reply-To: <DM4PR84MB13737BE099BF599DF83617DBFDBF9@DM4PR84MB1373.NAMPRD84.PROD.OUTLOOK.COM>
On 3/15/23 23:41, Seymour, Shane M wrote:
>> On Wed, Mar 15, 2023 at 06:08:19AM +0000, Seymour, Shane M wrote:
>>> The following patch implements host state statistics via sysfs. The intent
>>> is to allow user space to see the state changes and be able to report when
>>> a host changes state. The files do not separate out the time spent into
>>> each state but only into three:
>>
>> Why does userspace care about these things at all? What tool needs them
>> and what can userspace do with the information?
>>
>
> In enterprise setups you may a significant number of LUNs presented to a
> system (100s to 1000s) via a single HBA (usually via FC). Having a HBA going
> into error handling causes issues. Every time a host goes into SCSI EH all
> I/O to that host is blocked until SCSI EH completes. That means waiting for
> every I/O to either complete or timeout before starting any recovery
> processing.
>
> At this time there is no way for anything outside of the kernel to know if a
> HBA is having any issues. The cause of those issues can vary significantly,
> just two examples:
>
> 1) Storage end point issues
> 2) SAN issues (e.g. laser transmit power at any point in the SAN)
>
> My experience with downstream distros is that nobody seems to notice the
> noise that SCSI EH produces (LUN, device, bus, host resets) and we see it
> when we get a vmcore and have to try and work out what caused an I/O hang.
I hear you. Especially, the fact that the very desirable asynchronous aborts
and even eh with escalations seems pretty much silent as long as a SCSI command
succeeds within one of the allowed retries. I suspect this was done in order
not to unsettle users by showing intermediate recovery, which can still lead to
successful I/O eventually.
FWIW, at some point we figured out a nice scsi_logging_level of 4605, in order
to see any problems with lun probing ("why don't I get my volume in Linux?") or
timeouts/aborts/eh ("why are things so slow?") without producing kernel
messages for regular good I/O. Of course, it's not set by default, but can be
dynamically set if one suspects such problems.
> I wanted to be more proactive in warning users that you've got a potential
> storage issue you need to look at. It won't help when you have a sudden
> massive issue but if you have an issue that is slowly getting worse over
> a period of time you will at least get some warning.
>
>>>
>>> A (GPLv2) program called hostmond will be released in a few months that
>>> will monitor these interfaces and report (local host only via syslog(3C))
>>> when hosts change state.
>>
>> We kind of need to see this before the kernel changes can be accepted
>> for obvious reasons, what is preventing that from happening now?
>
> If you don't mind I'll answer this in my reply to James' email soon since
> he commented about this.
>
>>
>> Please always use sysfs_emit() instead of the crazy scnprintf() for
>> sysfs entries.
>
> No problem I can make that change.
>
>>
>> u32 is a kernel type, not uint32_t please, but I don't know what the
>> scsi layer is used to.
>
> No problem I can make that change.
>
>>
>> thanks,
>>
>> greg k-h
>
> Thank you for your willingness to provide feedback.
>
> Shane
--
Mit freundlichen Gruessen / Kind regards
Steffen Maier
Linux on IBM Z and LinuxONE
https://www.ibm.com/privacy/us/en/
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschaeftsfuehrung: David Faller
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
prev parent reply other threads:[~2023-03-17 16:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 6:08 [PATCH for-next] scsi: Implement host state statistics Seymour, Shane M
2023-03-15 6:36 ` Greg KH
2023-03-15 11:48 ` James Bottomley
2023-03-16 0:15 ` Seymour, Shane M
2023-03-15 22:41 ` Seymour, Shane M
2023-03-17 16:52 ` Steffen Maier [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=8f17a884-09d2-b6a1-7ced-77dd4b4f21a5@linux.ibm.com \
--to=maier@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jejb@linux.ibm.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=shane.seymour@hpe.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 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).