diff options
author | Nikita Danilov <nikita@clusterfs.com> | 2005-06-21 20:14:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 21:46:14 -0400 |
commit | 295ab93497ec703f7d6eaf0787dd9768b83035fe (patch) | |
tree | e3dce05d4cab0d7d3907a7357d37932c99ffd76d /fs | |
parent | 05b7438475ddbac47e75506913d44550f0e75938 (diff) |
[PATCH] mm: add /proc/zoneinfo
Add /proc/zoneinfo file to display information about memory zones. Useful
to analyze VM behaviour.
Signed-off-by: Nikita Danilov <nikita@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/proc_misc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index a60a3b3d8a7b..63a9fbf1ac51 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -219,6 +219,19 @@ static struct file_operations fragmentation_file_operations = { | |||
219 | .release = seq_release, | 219 | .release = seq_release, |
220 | }; | 220 | }; |
221 | 221 | ||
222 | extern struct seq_operations zoneinfo_op; | ||
223 | static int zoneinfo_open(struct inode *inode, struct file *file) | ||
224 | { | ||
225 | return seq_open(file, &zoneinfo_op); | ||
226 | } | ||
227 | |||
228 | static struct file_operations proc_zoneinfo_file_operations = { | ||
229 | .open = zoneinfo_open, | ||
230 | .read = seq_read, | ||
231 | .llseek = seq_lseek, | ||
232 | .release = seq_release, | ||
233 | }; | ||
234 | |||
222 | static int version_read_proc(char *page, char **start, off_t off, | 235 | static int version_read_proc(char *page, char **start, off_t off, |
223 | int count, int *eof, void *data) | 236 | int count, int *eof, void *data) |
224 | { | 237 | { |
@@ -589,6 +602,7 @@ void __init proc_misc_init(void) | |||
589 | create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations); | 602 | create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations); |
590 | create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations); | 603 | create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations); |
591 | create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations); | 604 | create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations); |
605 | create_seq_entry("zoneinfo",S_IRUGO, &proc_zoneinfo_file_operations); | ||
592 | create_seq_entry("diskstats", 0, &proc_diskstats_operations); | 606 | create_seq_entry("diskstats", 0, &proc_diskstats_operations); |
593 | #ifdef CONFIG_MODULES | 607 | #ifdef CONFIG_MODULES |
594 | create_seq_entry("modules", 0, &proc_modules_operations); | 608 | create_seq_entry("modules", 0, &proc_modules_operations); |