All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Enzo Matsumiya <ematsumiya@suse.de>
Cc: Hannes Reinecke <hare@suse.de>,
	linux-leds@vger.kernel.org, linux-block@vger.kernel.org,
	u.kleine-koenig@pengutronix.de, Jens Axboe <axboe@kernel.dk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] leds: trigger: implement block trigger
Date: Tue, 4 May 2021 17:43:56 +0200	[thread overview]
Message-ID: <YJFrvI4I2qe7UyMW@mobian> (raw)
In-Reply-To: <20210503165615.maqgm5e2gq554hcm@hyori>

On Mon 2021-05-03 13:56:15, Enzo Matsumiya wrote:
> On 05/03, Pavel Machek wrote:
> > > As already commented on, this for_each_blk() construct is not a good idea.
> > > Infact, I guess it would be better if you could invert the logic:
> > > Not having the block trigger enumerating all devices, but rather let the
> > > devices register with the block trigger.
> > > That would have the benefit that one could choose which block device should
> > > be handled by the LED trigger subsystem, _and_ you would avoid the need for
> > > a for_each_blk() construct.
> > > Thing is, I don't think that all block devices should be handled by the LED
> > > trigger; eg for things like 'loop' or 'ramdisk' it is very
> > > >questionable.
> > 
> > > Downside is that you would need to modify the drivers, but realistically
> > > there are only very few drivers which should be modified; I would go for
> > > nvme-pci and the sd driver for starters. Maybe floppy, but arguably that can
> > > omitted as one has a very good audio indicator for floppy accesses
> > > :-)
> > 
> > And we already have disk activity trigger. Maybe NVMe and SD needs to
> > be modified to use it?
> 
> TBH I haven't thought of that. My initial idea was to actually offer
> maximum flexibility to the user, so exposing all block devices on the
> system [*], being able to set any LED available as an indicator for each
> of those.
> 
> But, indeed, just using ledtrig-disk in NVMe and SD might just be
> simpler.
> 
> 
> [*] - again, I see now this was a bad idea and will be changed in a
> possible next version

Sounds like there should be no new version. Modify NVMe/SD if
required, instead.

Oh and disk-activity LED trigger blinks when disk is fully loaded. I
believe that is a bug and I'd not mind if it was fixed. I probably
have local patch that needs cleaning up somewhere.

Best regards,
								Pavel

-- 

      reply	other threads:[~2021-05-04 15:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 18:32 [RFC PATCH 0/2] leds: trigger: introduce block trigger Enzo Matsumiya
2021-04-30 18:32 ` [RFC PATCH 1/2] block: export block_class and disk_type symbols Enzo Matsumiya
2021-05-01  6:24   ` Greg Kroah-Hartman
2021-05-03  2:37     ` Enzo Matsumiya
2021-05-03  4:48       ` Greg Kroah-Hartman
2021-05-03  7:04   ` Christoph Hellwig
2021-05-03 16:50     ` Enzo Matsumiya
2021-04-30 18:32 ` [RFC PATCH 2/2] leds: trigger: implement block trigger Enzo Matsumiya
2021-04-30 18:52   ` Randy Dunlap
2021-05-03  2:38     ` Enzo Matsumiya
2021-04-30 20:11   ` Marek Behun
2021-05-03  2:46     ` Enzo Matsumiya
2021-05-03  5:53   ` Hannes Reinecke
2021-05-03 10:11     ` Pavel Machek
2021-05-03 16:56       ` Enzo Matsumiya
2021-05-04 15:43         ` Pavel Machek [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=YJFrvI4I2qe7UyMW@mobian \
    --to=pavel@ucw.cz \
    --cc=axboe@kernel.dk \
    --cc=ematsumiya@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hare@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.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 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.