Re: [PATCH] Create new LED trigger for CPU activity

From: Pavel Machek
Date: Thu Jul 06 2006 - 19:50:38 EST


Hi!

> This patch creates a new LED trigger that triggers whenever the CPU is
> active. It can be configured with module parameters to trigger on any
> combination of user, nice, system, or iowait time, and defaults to
> including user and system time but not nice or iowait time. I've tested
> it a bit, and it seems to work, but no guarantees. It's diffed against
> 2.6.17-git25.
>
> Signed-off-by: Thomas Tuttle <thinkinginbinary@xxxxxxxxx>

I like the idea.. CPU usage led is very useful, and old led system
actually provided it. But...

> +/*
> + * ChangeLog:
> + *
> + * Revision 3 (2006/06/06):
> + * Added module parameters to configure which time is counted as CPU
> + * activity. (thanks to Andrew Morton)
> + *
> + * Revision 2 (2006/06/05):
> + * Diffed against 2.6.17-git25 instead of 2.6.17.1.
> + * Fixed several code style issues (thanks to Randy Dunlap)
> + *
> + * Revision 1 (2006/06/05):
> + * Initial patch submitted.
> + */

Please don't include changelogs in sources.

> +#define UPDATE_INTERVAL (5) /* delay between updates, in ms */

Polling every 5 msec is going to cost _lot_ of juice. Is there a
better way?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
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/