linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: linux-mtd@lists.infradead.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Jacek Anaszewski <j.anaszewski@samsung.com>,
	linux-leds@vger.kernel.org
Subject: Re: nand-disk LED trigger: to remove, or not to remove
Date: Wed, 6 Apr 2016 11:03:16 -0700	[thread overview]
Message-ID: <20160406180316.GA11756@localhost> (raw)
In-Reply-To: <20160405195120.GA6111@laptop.cereza>

On Tue, Apr 05, 2016 at 04:51:20PM -0300, Ezequiel Garcia wrote:
> Due to the way the 'nand-disk' LED trigger is implemented,
> it currently does not work correctly for all NAND drivers.
> 
> This is somewhat related to an old thread, where we discussed
> the addition of an "mtd" LED trigger. See:
> 
>   http://www.spinics.net/lists/linux-leds/msg01181.html
> 
> My question is:
> 
>  * given that nobody has complained about "nand-disk"
>    working on just some NAND drivers, and...
>  * given that nobody has complained (except that 2013 patch)
>    about lacking a generic MTD LED trigger...
> 
> Does it make any sense to have such a trigger at all?
> In other words, should we simply get rid of "nand-disk" trigger?

I don't have much opinion about the LED trigger, except that it'd be
nice if it either worked consistently or was removed.

> In case the answer is "We want to keep some LED trigger",
> then here's a patch for you to f̶l̶a̶m̶e̶  review:
> 
> From 88c7102bb67056b443da323bd3e28b60aca948a2 Mon Sep 17 00:00:00 2001
> From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> Date: Sat, 2 Apr 2016 18:35:50 -0300
> Subject: [PATCH] leds: trigger: Introduce a MTD (NAND/NOR) trigger
> 
> This commit introduces a MTD trigger for flash (NAND/NOR) device
> activity. The implementation is copied from IDE disk.
> 
> This deprecates the "nand-disk" LED trigger, but for backwards
> compatibility, we still keep the "nand-disk" trigger around.
> 
> The motivation for deprecating the "nand-disk" LED trigger is that
> it only works for NAND drivers, whereas the "mtd" LED trigger
> is more generic (in fact, "nand-disk" currently only works for
> certain NAND drivers).
> 
>   TODO: Measure how the trigger affects MTD I/O performance.
>   It should be cheap because the blink is deferred, but still
>   it makes sense to provide some hard numbers.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

[...]

Notably, your patch changes the behavior pretty significantly. Instead
of triggering for individual NAND wait periods (very fine-grained) you
only trigger for entire write/read/erase operations. That may be OK,
especially if it's modelled after IDE.

I'd also note that you missed a few APIs (e.g., mtd_{read,write}_oob()).

Brian

  reply	other threads:[~2016-04-06 18:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05 19:51 nand-disk LED trigger: to remove, or not to remove Ezequiel Garcia
2016-04-06 18:03 ` Brian Norris [this message]
2016-04-08  0:37   ` Boris Brezillon
2016-04-08  3:05     ` Ezequiel Garcia
2016-04-08  0:32 ` Boris Brezillon
2016-04-08  3:02   ` Ezequiel Garcia
2016-04-08  7:38     ` Jacek Anaszewski

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=20160406180316.GA11756@localhost \
    --to=computersforpeace@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /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).