From: Avri Altman <Avri.Altman@wdc.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] scsi: ufs: critical health condition
Date: Thu, 6 Feb 2025 18:25:10 +0000 [thread overview]
Message-ID: <DM6PR04MB6575471948A3F86CA56DF31BFCF62@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <b3f8a233-7172-41d8-a39b-49e6014a2aff@acm.org>
> On 2/6/25 9:47 AM, Avri Altman wrote:
> >> On 2/6/25 12:54 AM, Avri Altman wrote:
> >>> After some further internal discussions: The set conditions are
> >>> vendor specific; The device may set it as many times it wants
> >>> depending on its criticality. The spec does not define that nor what
> >>> the host should do. So there is this concern that some vendors will
> >>> report multiple times, while other wont. Hence, reading
> >>> critical_health = 1 might be misleading. What do you think?
> >
> > Still not sure if you want this to be a counter?
>
> Since the event can be reported multiple times, a counter sounds better to me
> than a boolean.
Done.
> >> How about emitting a uevent if a critical health condition has been
> >> reported by a UFS device? See also sdev_evt_send().
> > Thanks for pointing this out.
> > A ufs event in enum scsi_device_event seems misplaced - looks like it was
> invented for unit attention codes.
> > How about calling kobject_uevent() or kobject_uevent_env() directly from the
> driver?
>
> Please note that emitting a uevent is not the only possible approach for informing
> user space code. Emitting a uevent is recommended if the code that processes an
> event can be implemented as a shell script. Could it be more likely that critical
> health events will be processed by C or C++ code rather than a shell script? If so,
> how about making the sysfs attribute that reports the number of critical health
> events pollable? In C and C++ code, polling a sysfs attribute requires less code
> than listening for uevents.
Done.
Thanks,
Avri
>
> Thanks,
>
> Bart.
prev parent reply other threads:[~2025-02-06 18:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 14:31 Avri Altman
2025-02-05 18:00 ` Bart Van Assche
2025-02-05 18:04 ` Avri Altman
2025-02-05 19:07 ` Avri Altman
2025-02-06 8:54 ` Avri Altman
2025-02-06 15:54 ` Bart Van Assche
2025-02-06 17:47 ` Avri Altman
2025-02-06 18:08 ` Bart Van Assche
2025-02-06 18:25 ` Avri Altman [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=DM6PR04MB6575471948A3F86CA56DF31BFCF62@DM6PR04MB6575.namprd04.prod.outlook.com \
--to=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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
all inboxes | Powered by JetHome®