diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-09-30 00:32:42 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-09-30 00:32:42 -0400 |
commit | 296c355cd6443d89fa251885a8d78778fe111dc4 (patch) | |
tree | 5cf7c8b115617dc3829a16a5969894d37b73173c /fs/ext4/ext4.h | |
parent | 90576c0b9a0b5323fc4bd7f23f49be0d234f36d1 (diff) |
ext4: Use tracepoints for mb_history trace file
The /proc/fs/ext4/<dev>/mb_history was maintained manually, and had a
number of problems: it required a largish amount of memory to be
allocated for each ext4 filesystem, and the s_mb_history_lock
introduced a CPU contention problem.
By ripping out the mb_history code and replacing it with ftrace
tracepoints, and we get more functionality: timestamps, event
filtering, the ability to correlate mballoc history with other ext4
tracepoints, etc.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index b491576e11c3..c508cf7be75c 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -65,6 +65,12 @@ typedef __u32 ext4_lblk_t; | |||
65 | /* data type for block group number */ | 65 | /* data type for block group number */ |
66 | typedef unsigned int ext4_group_t; | 66 | typedef unsigned int ext4_group_t; |
67 | 67 | ||
68 | /* | ||
69 | * Flags used in mballoc's allocation_context flags field. | ||
70 | * | ||
71 | * Also used to show what's going on for debugging purposes when the | ||
72 | * flag field is exported via the traceport interface | ||
73 | */ | ||
68 | 74 | ||
69 | /* prefer goal again. length */ | 75 | /* prefer goal again. length */ |
70 | #define EXT4_MB_HINT_MERGE 0x0001 | 76 | #define EXT4_MB_HINT_MERGE 0x0001 |
@@ -971,14 +977,6 @@ struct ext4_sb_info { | |||
971 | unsigned long s_mb_last_group; | 977 | unsigned long s_mb_last_group; |
972 | unsigned long s_mb_last_start; | 978 | unsigned long s_mb_last_start; |
973 | 979 | ||
974 | /* history to debug policy */ | ||
975 | struct ext4_mb_history *s_mb_history; | ||
976 | int s_mb_history_cur; | ||
977 | int s_mb_history_max; | ||
978 | int s_mb_history_num; | ||
979 | spinlock_t s_mb_history_lock; | ||
980 | int s_mb_history_filter; | ||
981 | |||
982 | /* stats for buddy allocator */ | 980 | /* stats for buddy allocator */ |
983 | spinlock_t s_mb_pa_lock; | 981 | spinlock_t s_mb_pa_lock; |
984 | atomic_t s_bal_reqs; /* number of reqs with len > 1 */ | 982 | atomic_t s_bal_reqs; /* number of reqs with len > 1 */ |