Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Markus Probst <markus.probst@posteo.de>
To: Damien Le Moal <dlemoal@kernel.org>, Niklas Cassel <cassel@kernel.org>
Cc: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley	 <conor+dt@kernel.org>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	John Garry <john.g.garry@oracle.com>,
	Jason Yan <yanaijie@huawei.com>,
	"James E.J. Bottomley"	 <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen"	 <martin.petersen@oracle.com>,
	Pavel Machek <pavel@ucw.cz>,
	 linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	 linux-scsi@vger.kernel.org, Ian Pilcher <arequipeno@gmail.com>
Subject: Re: [PATCH RFC 0/4] leds: extend disk trigger
Date: Wed, 28 Jan 2026 15:44:19 +0000	[thread overview]
Message-ID: <c34fb5404e7033fe719b0072ea8a87a1caa2bf80.camel@posteo.de> (raw)
In-Reply-To: <2382dee0-983f-4c69-af7b-a7a48cad23aa@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3004 bytes --]

On Wed, 2026-01-28 at 15:34 +0900, Damien Le Moal wrote:
> On 1/28/26 12:34 AM, Markus Probst wrote:
> > > Having a user space implementation for your feature would also allow
> > > an upstream kernel, without the need for any custom kernel patches.
> > Only because it can be done in userspace, doesn't mean it should be.
> 
> Yes it should. Maintaining userspace is far easier than forcing kernel changes
> onto users to get blinking LEDs. So unless you have a very strong argument for
> doing it in the kernel, userspace is probably the right approach. That will
> apply to any block device, and not just ATA devices. E.g. NAS with M.2 NVMe
> storage can work with the same.
> 
> > > There seems to be existing user space applications that handles this,
> > > I think both the daemon I linked to before, which uses /sys/block/<dev>/stat
> > > which is thus per device and not per port, and e.g. this:
> > > https://linux.die.net/man/8/ledmon
> > > https://github.com/md-raid-utilities/ledmon
> > > https://github.com/md-raid-utilities/ledmon/blob/main/src/lib/ahci.c
> > As far as I can tell, this daemon doesn't actually use the LED
> > Subsystem, but instead leds directly connected to the storage
> > controller.
> > But yes, I would be capable of coding such daemon.
> 
> Then let's try.
I will give it a try.

@Ian: I will notify you, once there is a working version.

> That will allow checking if anything is missing in the kernel
> interface to do that nicely.
There is.

I noticed for leds, that the fwnode path isn't exposed in sysfs.
"/sys/class/leds/<name>/device/firmware_node/path" exists, but points
to the parent device.

Something similar with scsi and ata exists. scsi doesn't expose the
firmware_node and there is no symlink (or other connection that I am
ware of) between scsi_* and ata_* in sysfs. This means, I cannot map a
fwnode path to a block device.

If I want to distribute a pre-defined config for such led userspace
daemon alongside the ACPI Overlay for a specific NAS model, I need an
identifier that is equal across all devices with that specific NAS
model.

This is less of an issue for leds, but given that leds could be renamed
on name collisions the issue still exists.

Thanks
- Markus Probst

> 
> > > I think my main concern is that I don't think we should bloat the kernel
> > > for a complex feature that can just as well be implemented in user space.
> > It is still unclear to me if you worry about the complexity in
> > drivers/ata/libata-* or drivers/leds/trigger/ledtrig-disk.c
> 
> It is not so much about complexity but rather the fact that controlling
> blinking LEDs in the hot IO path is not desirable. While SATA HDDs will be less
> sensible to the delays caused by the calls to the LED control functions
> compared to fast NVMe SSDs, we do also need to think about much faster SATA
> SSDs. So instead of risking performance regressions, let's try to do this in
> userspace first.
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]

  reply	other threads:[~2026-01-28 15:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 19:05 [PATCH RFC 0/4] leds: extend disk trigger Markus Probst
2026-01-23 19:05 ` [PATCH RFC 1/4] leds: dt-bindings: add disk trigger led pattern Markus Probst
2026-01-23 19:05 ` [PATCH RFC 2/4] leds: dt-bindings: add disk trigger for each ata port Markus Probst
2026-01-23 19:05 ` [PATCH RFC 3/4] leds: add delay_on, delay_off and invert attributes to disk trigger Markus Probst
2026-01-23 19:18   ` Markus Probst
2026-01-23 19:05 ` [PATCH RFC 4/4] leds: add disk trigger for each ata port Markus Probst
2026-01-26  6:34   ` Damien Le Moal
2026-01-24 23:21 ` [PATCH RFC 0/4] leds: extend disk trigger Pavel Machek
2026-01-25  0:19   ` Markus Probst
2026-01-26  9:00 ` Niklas Cassel
2026-01-26 16:19   ` Ian Pilcher
2026-01-26 19:03     ` Niklas Cassel
2026-01-26 22:06   ` Markus Probst
2026-01-27  9:32     ` Niklas Cassel
2026-01-27 15:34       ` Markus Probst
2026-01-28  6:34         ` Damien Le Moal
2026-01-28 15:44           ` Markus Probst [this message]
2026-01-28 21:51             ` Niklas Cassel
2026-01-29  4:41             ` Damien Le Moal

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=c34fb5404e7033fe719b0072ea8a87a1caa2bf80.camel@posteo.de \
    --to=markus.probst@posteo.de \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=arequipeno@gmail.com \
    --cc=cassel@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=john.g.garry@oracle.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=pavel@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=yanaijie@huawei.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