UBUNTU: SAUCE: (no-up) vfs: Add a trace point in the mark_inode_dirty function
authorArjan van de Ven <arjan@linux.intel.com>
Sun, 25 Oct 2009 22:37:04 +0000 (15:37 -0700)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 2 Apr 2012 20:10:07 +0000 (13:10 -0700)
commit542d041e75b70bcbfa2580a6a01f39101a8e248c
treee801fe30b5006a8125fb9a0aa9b1f7d23abbbeea
parent41f1e52abeef7e45d2c18f3dc8a462a4970664ea
UBUNTU: SAUCE: (no-up) vfs: Add a trace point in the mark_inode_dirty function

[apw@canonical.com: This has no upstream traction but is used by powertop,
so its worth carrying.]

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 <arjan@linux.intel.com>
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
fs/fs-writeback.c
fs/inode.c
include/trace/events/vfs.h [new file with mode: 0644]