1 #include <linux/atomic.h>
5 #include <linux/debugfs.h>
7 ssize_t ramster_eph_pages_remoted;
8 ssize_t ramster_pers_pages_remoted;
9 ssize_t ramster_eph_pages_remote_failed;
10 ssize_t ramster_pers_pages_remote_failed;
11 ssize_t ramster_remote_eph_pages_succ_get;
12 ssize_t ramster_remote_pers_pages_succ_get;
13 ssize_t ramster_remote_eph_pages_unsucc_get;
14 ssize_t ramster_remote_pers_pages_unsucc_get;
15 ssize_t ramster_pers_pages_remote_nomem;
16 ssize_t ramster_remote_objects_flushed;
17 ssize_t ramster_remote_object_flushes_failed;
18 ssize_t ramster_remote_pages_flushed;
19 ssize_t ramster_remote_page_flushes_failed;
21 #define ATTR(x) { .name = #x, .val = &ramster_##x, }
22 static struct debug_entry {
26 ATTR(eph_pages_remoted),
27 ATTR(pers_pages_remoted),
28 ATTR(eph_pages_remote_failed),
29 ATTR(pers_pages_remote_failed),
30 ATTR(remote_eph_pages_succ_get),
31 ATTR(remote_pers_pages_succ_get),
32 ATTR(remote_eph_pages_unsucc_get),
33 ATTR(remote_pers_pages_unsucc_get),
34 ATTR(pers_pages_remote_nomem),
35 ATTR(remote_objects_flushed),
36 ATTR(remote_pages_flushed),
37 ATTR(remote_object_flushes_failed),
38 ATTR(remote_page_flushes_failed),
39 ATTR(foreign_eph_pages),
40 ATTR(foreign_eph_pages_max),
41 ATTR(foreign_pers_pages),
42 ATTR(foreign_pers_pages_max),
46 int __init ramster_debugfs_init(void)
49 struct dentry *root = debugfs_create_dir("ramster", NULL);
53 for (i = 0; i < ARRAY_SIZE(attrs); i++)
54 if (!debugfs_create_size_t(attrs[i].name,
55 S_IRUGO, root, attrs[i].val))
62 static inline int ramster_debugfs_init(void)