Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
- From: Jens Axboe <axboe@xxxxxxx>
- Date: Tue, 31 Jan 2006 21:35:53 +0100
On Tue, Jan 31 2006, Richard Purdie wrote:
> Hi,
>
> On Tue, 2006-01-31 at 15:46 +0100, Bartlomiej Zolnierkiewicz wrote:
> >
> > Why cannot existing block layer hook be used for this?
>
> The trigger is supposed to be reflecting actual hardware activity, not
> block layer activity.
>
> I'll experiment with the feasibility of the block later as I've always
> been uneasy about the hooks into the lower level layers. There are a
> number of issues to consider though.
>
> 1. The block layer isn't always aware of device activity (eg. flash
> block erasing in mtd devices) (is this the case for IDE?).
>
> 2. Default trigger naming becomes problematic for led devices. Currently
> an MMC card reader's LED could set its trigger to say "mmc-disk" and end
> up with some kind of sensible activity light. (ignoring the more than
> one card reader case where all the lights would be synced :).
>
> A potential solution would be to add individual gendisk triggers by
> hooking add_disk/del_disk. The MMC read would presumably know its
> major/minor number before registering its LED.
>
> I'm not sure how to intercept disk activity for a given gendisk offhand.
> There is also a question of where the led_trigger pointers end up.
> struct gendisk may or may not be acceptable.
>
> 3. Matching something like all IDE disks becomes hard (and is actually
> more desirable than individual devices at times - see below).
>
> At first glance a potential solution would be to hook
> register_blkdev/unregister_blkdev and create yet more triggers but where
> do you hook the activity? There is no data structure the led trigger
> pointer can be part of either.
>
> These solutions are going to end up with a lot of unused led triggers on
> any given system.
Perhaps a generic solution isn't feasible, because this isn't really a
generic problem. The LED stuff has very limited use - you mention
embedded platforms, perhaps they should just be doing this on their own?
Generally I'm finding a hard time justifying an LED api, honestly. It
just feels like one of those things where the actual abstraction ends up
being a lot bigger than code needed. Abstracting and creating an API
isn't always useful.
--
Jens Axboe
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
- From: Richard Purdie
- Re: LED: Add IDE disk activity LED trigger
- From: Jordan Crouse
- Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
- References:
- [PATCH 10/11] LED: Add IDE disk activity LED trigger
- From: Richard Purdie
- Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
- From: Bartlomiej Zolnierkiewicz
- Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
- From: Richard Purdie
- [PATCH 10/11] LED: Add IDE disk activity LED trigger
- Prev by Date: Re: GPL V3 and Linux - Dead Copyright Holders
- Next by Date: [patch 1/6] Add MMC password protection (lock/unlock) support V4
- Previous by thread: Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
- Next by thread: Re: LED: Add IDE disk activity LED trigger
- Index(es):
Relevant Pages
- Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
... >> Why cannot existing block layer hook be used for this? ... Default
trigger naming becomes problematic for led devices. ... Matching something like all IDE
disks becomes hard (and is actually ... (Linux-Kernel) - Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
... > Why cannot existing block layer hook be used for this? ... Default trigger
naming becomes problematic for led devices. ... Matching something like all IDE disks
becomes hard (and is actually ... At first glance a potential solution would be to hook
... (Linux-Kernel) - Re: [PATCH 10/11] LED: Add IDE disk activity LED trigger
... On Tue, Jan 31 2006, Bartlomiej Zolnierkiewicz wrote: ... >>> Why cannot
existing block layer hook be used for this? ... >> The trigger is supposed
to be reflecting actual hardware activity, ... (Linux-Kernel) - Re: pic a/d problems
... It would also be a good idea to hook a scope probe to the ... supply
and center trigger on the AD conversion event. ... (sci.electronics.design) - Re: [patch 2.6.15-rc2] blk: request poisoning
... >>This patch should make request poisoning more useful ... >>Don't
think I have hardware that will trigger a requeue, ... AS was a new concept to the block
layer. ... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel)