summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0080-vfs-Add-a-trace-point-in-the-mark_inode_dirty-functi.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-07-17 09:23:14 +0200
committerDenys Dmytriyenko <denys@ti.com>2012-07-31 15:49:41 -0400
commitf95b2e51ea8194b82d2476b338610782a83ce4de (patch)
tree4247f78cc4cd7a203fa3ffb6ae1712388470e79e /recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0080-vfs-Add-a-trace-point-in-the-mark_inode_dirty-functi.patch
parentced11b612173e112f981fa99612a8c6f6f399cfb (diff)
downloadmeta-ti-f95b2e51ea8194b82d2476b338610782a83ce4de.tar.gz
linux-ti33x-psp 3.2: update to 3.2.23
Regenerate all beaglebone patches and add one vfs tracer patch for powertop Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0080-vfs-Add-a-trace-point-in-the-mark_inode_dirty-functi.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0080-vfs-Add-a-trace-point-in-the-mark_inode_dirty-functi.patch103
1 files changed, 103 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0080-vfs-Add-a-trace-point-in-the-mark_inode_dirty-functi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0080-vfs-Add-a-trace-point-in-the-mark_inode_dirty-functi.patch
new file mode 100644
index 00000000..f45178c2
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0080-vfs-Add-a-trace-point-in-the-mark_inode_dirty-functi.patch
@@ -0,0 +1,103 @@
1From a0a3563affbbebd9c7385586e1d6031de82c2a83 Mon Sep 17 00:00:00 2001
2From: Arjan van de Ven <arjan at linux.intel.com>
3Date: Fri, 26 Nov 2010 12:18:03 -0800
4Subject: [PATCH] vfs: Add a trace point in the mark_inode_dirty function
5
6PowerTOP would like to be able to show who is keeping the disk
7busy by dirtying data. The most logical spot for this is in the vfs
8in the mark_inode_dirty() function, doing this on the block level
9is not possible because by the time the IO hits the block layer the
10guilty party can no longer be found ("kjournald" and "pdflush" are not
11useful answers to "who caused this file to be dirty).
12
13The trace point follows the same logic/style as the block_dump code
14and pretty much dumps the same data, just not to dmesg (and thus to
15/var/log/messages) but via the trace events streams.
16
17Eventually we should be able to phase out the block dump code, but that's
18for later on after a transition time.
19---
20 fs/fs-writeback.c | 3 +++
21 include/linux/fs.h | 12 ++++++++++++
22 include/trace/events/writeback.h | 28 ++++++++++++++++++++++++++++
23 3 files changed, 43 insertions(+)
24
25diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
26index 54f5786..981ec8c 100644
27--- a/fs/fs-writeback.c
28+++ b/fs/fs-writeback.c
29@@ -1072,6 +1072,9 @@ void __mark_inode_dirty(struct inode *inode, int flags)
30 if ((inode->i_state & flags) == flags)
31 return;
32
33+ if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES))
34+ trace_writeback_inode_dirty(inode, flags);
35+
36 if (unlikely(block_dump))
37 block_dump___mark_inode_dirty(inode);
38
39diff --git a/include/linux/fs.h b/include/linux/fs.h
40index 43d36b7..a3e46ee 100644
41--- a/include/linux/fs.h
42+++ b/include/linux/fs.h
43@@ -1759,6 +1759,18 @@ struct super_operations {
44
45 #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES)
46
47+#define INODE_DIRTY_FLAGS \
48+ { I_DIRTY_SYNC, "DIRTY-SYNC" }, \
49+ { I_DIRTY_DATASYNC, "DIRTY-DATASYNC" }, \
50+ { I_DIRTY_PAGES, "DIRTY-PAGES" }, \
51+ { I_NEW, "NEW" }, \
52+ { I_WILL_FREE, "WILL-FREE" }, \
53+ { I_FREEING, "FREEING" }, \
54+ { I_CLEAR, "CLEAR" }, \
55+ { I_SYNC, "SYNC" }, \
56+ { I_REFERENCED, "REFERENCED" }
57+
58+
59 extern void __mark_inode_dirty(struct inode *, int);
60 static inline void mark_inode_dirty(struct inode *inode)
61 {
62diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
63index 1f48f14..8053e75 100644
64--- a/include/trace/events/writeback.h
65+++ b/include/trace/events/writeback.h
66@@ -400,6 +400,34 @@ DEFINE_EVENT(writeback_congest_waited_template, writeback_wait_iff_congested,
67 TP_ARGS(usec_timeout, usec_delayed)
68 );
69
70+/*
71+ * Tracepoint for dirtying an inode; used by PowerTOP
72+ */
73+TRACE_EVENT(writeback_inode_dirty,
74+
75+ TP_PROTO(struct inode *inode, int flags),
76+
77+ TP_ARGS(inode, flags),
78+
79+ TP_STRUCT__entry(
80+ __field( __kernel_dev_t, dev )
81+ __field( ino_t, ino )
82+ __field( u32, flags )
83+ ),
84+
85+ TP_fast_assign(
86+ __entry->dev = inode->i_sb->s_dev;
87+ __entry->ino = inode->i_ino;
88+ __entry->flags = flags;
89+ ),
90+
91+ TP_printk("dev %d:%d ino %lu flags %d %s", MAJOR(__entry->dev), MINOR(__entry->dev),
92+ (unsigned long) __entry->ino,
93+ __entry->flags,
94+ __print_flags(__entry->flags, "|", INODE_DIRTY_FLAGS)
95+ )
96+);
97+
98 DECLARE_EVENT_CLASS(writeback_single_inode_template,
99
100 TP_PROTO(struct inode *inode,
101--
1021.7.10
103