mbox series

[v2,0/3] introduce LED block device activity trigger

Message ID 1563807552-23498-1-git-send-email-akinobu.mita@gmail.com (mailing list archive)
Headers show
Series introduce LED block device activity trigger | expand

Message

Akinobu Mita July 22, 2019, 2:59 p.m. UTC
This work is inspired by the report on linux-nvme mailing list.

disk-activity trigger not working for nvme disk:
http://lists.infradead.org/pipermail/linux-nvme/2019-July/025253.html

This LED block device activity trigger works with any block devices.

* v2
- Remove "move declaration of led_stop_software_blink() to linux/leds.h" patch
- Move the trigger implementation to drivers/leds/trigger
- s/blk_ledtrig/ledtrig_blk/
- Add CONFIG_LEDS_TRIGGER_BLOCK
- Fix wrong bitops usages
- Add interface to stop and restart polling disk stats
- Stop polling disk stats for scsi disk during runtime suspend

Akinobu Mita (3):
  block: introduce LED block device activity trigger
  ledtrig-blk: add interface to stop and restart polling disk stats
  scsi: sd: stop polling disk stats by ledtrig-blk during runtime
    suspend

 block/genhd.c                      |   2 +
 drivers/leds/trigger/Kconfig       |   7 +
 drivers/leds/trigger/Makefile      |   1 +
 drivers/leds/trigger/ledtrig-blk.c | 258 +++++++++++++++++++++++++++++++++++++
 drivers/scsi/sd.c                  |  40 +++---
 include/linux/genhd.h              |   3 +
 include/linux/leds.h               |  38 ++++++
 7 files changed, 332 insertions(+), 17 deletions(-)
 create mode 100644 drivers/leds/trigger/ledtrig-blk.c

Cc: Frank Steiner <fsteiner-mail1@bio.ifi.lmu.de>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>

Comments

Frank Steiner Aug. 10, 2019, 3:41 p.m. UTC | #1
Akinobu Mita wrote:

> This work is inspired by the report on linux-nvme mailing list.
> 
> disk-activity trigger not working for nvme disk:
> http://lists.infradead.org/pipermail/linux-nvme/2019-July/025253.html
> 
> This LED block device activity trigger works with any block devices.

I've backported/hacked this (together with the "rename LED_OFF and LED_ON"
and some additional patches) to the current SLES 15 kernel (4.12.14)
and can confirm that it works great for my Thinkpad T580 with e.g. the
FnLock LED, as well as for all our office desktops, using block-nvme0n1
as trigger.

cu,
Frank