LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2.6.22] Add LED trigger to libata core
@ 2007-03-18 17:06 Tony Vroon
2007-03-19 4:42 ` Tejun Heo
0 siblings, 1 reply; 6+ messages in thread
From: Tony Vroon @ 2007-03-18 17:06 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, linux-kernel
This duplicates the IDE core LED trigger in the libata core.
I plan to use this by allowing PMU LED control on G5 towers. My test platform
is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) with a K2 (sata_svw) controller.
Signed-off-by: Tony Vroon <chainsaw@gentoo.org>
--- linux-2.6/drivers/ata/libata-scsi.c.orig 2007-03-17 22:53:56.000000000 +0000
+++ linux-2.6/drivers/ata/libata-scsi.c 2007-03-17 22:53:15.000000000 +0000
@@ -46,6 +46,7 @@
#include <linux/libata.h>
#include <linux/hdreg.h>
#include <asm/uaccess.h>
+#include <linux/leds.h>
#include "libata.h"
@@ -2791,6 +2792,7 @@
struct ata_device *dev)
{
int rc = 0;
+ ledtrig_ide_activity();
if (unlikely(!scmd->cmd_len)) {
ata_dev_printk(dev, KERN_WARNING, "WARNING: zero len CDB\n");
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.22] Add LED trigger to libata core
2007-03-18 17:06 [PATCH 2.6.22] Add LED trigger to libata core Tony Vroon
@ 2007-03-19 4:42 ` Tejun Heo
2007-03-19 12:46 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2007-03-19 4:42 UTC (permalink / raw)
To: Tony Vroon; +Cc: Jeff Garzik, linux-ide, linux-kernel
Tony Vroon wrote:
> This duplicates the IDE core LED trigger in the libata core.
> I plan to use this by allowing PMU LED control on G5 towers. My test platform
> is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) with a K2 (sata_svw) controller.
I think this fits better in libata-core.c::ata_qc_issue(). Can you move
it to there?
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.22] Add LED trigger to libata core
2007-03-19 12:46 ` Alan Cox
@ 2007-03-19 12:12 ` Tony Vroon
2007-03-19 12:14 ` Tejun Heo
1 sibling, 0 replies; 6+ messages in thread
From: Tony Vroon @ 2007-03-19 12:12 UTC (permalink / raw)
To: Alan Cox; +Cc: Tejun Heo, Jeff Garzik, linux-ide, linux-kernel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Alan Cox wrote:
> Gak. I'd rather it stayed out of ata_qc_issue() which is a critical path
> for performance. Our command issu is already too heavy and not all
> controllers have queueing to absorb that. How many controllers actually
> need this hook and can we not have ata_qc_issue_with_led() helpers for
> them ?
We're talking about just sata_svw (Apple K2) right now. I'll have a go
at implementing it conditionally like you suggested. Consider the
patch withdrawn for now.
Regards,
Tony V.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF/n5Dp5vW4rUFj5oRCJbzAJ4+rkkqdA21If03WLFT6jquX+np+QCgwSGX
UV41rt4ZimQvf0kXLwkuFqo=
=Ar6p
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.22] Add LED trigger to libata core
2007-03-19 12:46 ` Alan Cox
2007-03-19 12:12 ` Tony Vroon
@ 2007-03-19 12:14 ` Tejun Heo
1 sibling, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2007-03-19 12:14 UTC (permalink / raw)
To: Alan Cox; +Cc: Tony Vroon, Jeff Garzik, linux-ide, linux-kernel
Alan Cox wrote:
> On Mon, 19 Mar 2007 13:42:37 +0900
> Tejun Heo <htejun@gmail.com> wrote:
>
>> Tony Vroon wrote:
>>> This duplicates the IDE core LED trigger in the libata core.
>>> I plan to use this by allowing PMU LED control on G5 towers. My test platform
>>> is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) with a K2 (sata_svw) controller.
>> I think this fits better in libata-core.c::ata_qc_issue(). Can you move
>> it to there?
>
> Gak. I'd rather it stayed out of ata_qc_issue() which is a critical path
> for performance.
The original place is in the critical path too. It's just at the outer
function which eventually calls ata_qc_issue() (the mapping is almost
one to one).
> Our command issu is already too heavy and not all
> controllers have queueing to absorb that. How many controllers actually
> need this hook and can we not have ata_qc_issue_with_led() helpers for
> them ?
Our issue path is somewhat expensive due to SCSI -> ATA translation but
I don't think it really matters on any modern cpu. It can definitely
hurt on embedded tho. :-(
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.22] Add LED trigger to libata core
2007-03-19 4:42 ` Tejun Heo
@ 2007-03-19 12:46 ` Alan Cox
2007-03-19 12:12 ` Tony Vroon
2007-03-19 12:14 ` Tejun Heo
0 siblings, 2 replies; 6+ messages in thread
From: Alan Cox @ 2007-03-19 12:46 UTC (permalink / raw)
To: Tejun Heo; +Cc: Tony Vroon, Jeff Garzik, linux-ide, linux-kernel
On Mon, 19 Mar 2007 13:42:37 +0900
Tejun Heo <htejun@gmail.com> wrote:
> Tony Vroon wrote:
> > This duplicates the IDE core LED trigger in the libata core.
> > I plan to use this by allowing PMU LED control on G5 towers. My test platform
> > is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) with a K2 (sata_svw) controller.
>
> I think this fits better in libata-core.c::ata_qc_issue(). Can you move
> it to there?
Gak. I'd rather it stayed out of ata_qc_issue() which is a critical path
for performance. Our command issu is already too heavy and not all
controllers have queueing to absorb that. How many controllers actually
need this hook and can we not have ata_qc_issue_with_led() helpers for
them ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.22] Add LED trigger to libata core
@ 2007-03-19 12:11 Mikael Pettersson
0 siblings, 0 replies; 6+ messages in thread
From: Mikael Pettersson @ 2007-03-19 12:11 UTC (permalink / raw)
To: alan, htejun; +Cc: chainsaw, jgarzik, linux-ide, linux-kernel
On Mon, 19 Mar 2007 12:46:16 +0000, Alan Cox wrote:
> > > This duplicates the IDE core LED trigger in the libata core.
> > > I plan to use this by allowing PMU LED control on G5 towers. My test platform
> > > is a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) with a K2 (sata_svw) controller.
> >
> > I think this fits better in libata-core.c::ata_qc_issue(). Can you move
> > it to there?
>
> Gak. I'd rather it stayed out of ata_qc_issue() which is a critical path
> for performance. Our command issu is already too heavy and not all
> controllers have queueing to absorb that. How many controllers actually
> need this hook and can we not have ata_qc_issue_with_led() helpers for
> them ?
Agreed, toggling a led for each request seems excessive.
At least Promise controllers tend to have a HW-driven
activity led header, so wouldn't need SW-triggered
activity leds except maybe if some stupid system failed
to wire up the led header.
/Mikael
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-03-19 12:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-18 17:06 [PATCH 2.6.22] Add LED trigger to libata core Tony Vroon
2007-03-19 4:42 ` Tejun Heo
2007-03-19 12:46 ` Alan Cox
2007-03-19 12:12 ` Tony Vroon
2007-03-19 12:14 ` Tejun Heo
2007-03-19 12:11 Mikael Pettersson
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).