Added the power on/off counter and expose via sysfs files.
The sysfs files, power_on_acct and power_off_acct, are created under
each codec hwdep sysfs directory (e.g. /sys/class/sound/hwC0D0).
The files show the msec length of the codec power-on and power-off,
Note: This patch is useful to powertop to tell the utilisation of the sound
device. It is cherry-picked from upstream
SHA ID: a2f6309e8
PowerTOP would like to be able to show who is keeping the disk
busy by dirtying data. The most logical spot for this is in the vfs
in the mark_inode_dirty() function. Doing this on the block level
is not possible because by the time the IO hits the block layer the
guilty party can no longer be found ("kjournald" and "pdflush" are not
useful answers to "who caused this file to be dirty).
The trace point follows the same logic/style as the block_dump code
and pretty much dumps the same data, just not to dmesg (and thus to
/var/log/messages) but via the trace events streams.
Note: This patch was posted to lkml and might potentially go into 2.6.33 but I
have not seen which maintainer will take it.
Signed-of-by: Arjan van de Ven <[hidden email]>
Signed-off-by: Amit Kucheria <[hidden email]>
fs/fs-writeback.c | 3 ++
fs/inode.c | 4 +++
include/trace/events/vfs.h | 53 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 60 insertions(+), 0 deletions(-)
create mode 100644 include/trace/events/vfs.h