summaryrefslogtreecommitdiff
path: root/include/linux/shrinker.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-01-08 00:13:18 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2017-01-20 09:07:08 -0900
commitb33fc8298f7e13226b9895abc57c9bfce5e3fa2d (patch)
treea3d2a5a909b6372f7777c1c5c18cef5f81d123a9 /include/linux/shrinker.h
parent7f4191a202ea4558ca2d5eb8a47daea33c9999c7 (diff)
bcache in userspace; userspace fsck
Diffstat (limited to 'include/linux/shrinker.h')
-rw-r--r--include/linux/shrinker.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
new file mode 100644
index 00000000..baa36b1a
--- /dev/null
+++ b/include/linux/shrinker.h
@@ -0,0 +1,25 @@
+#ifndef __TOOLS_LINUX_SHRINKER_H
+#define __TOOLS_LINUX_SHRINKER_H
+
+struct shrink_control {
+ gfp_t gfp_mask;
+ unsigned long nr_to_scan;
+};
+
+#define SHRINK_STOP (~0UL)
+
+struct shrinker {
+ unsigned long (*count_objects)(struct shrinker *,
+ struct shrink_control *sc);
+ unsigned long (*scan_objects)(struct shrinker *,
+ struct shrink_control *sc);
+
+ int seeks; /* seeks to recreate an obj */
+ long batch; /* reclaim batch size, 0 = default */
+ struct list_head list;
+};
+
+static inline int register_shrinker(struct shrinker *shrinker) { return 0; }
+static inline void unregister_shrinker(struct shrinker *shrinker) {}
+
+#endif /* __TOOLS_LINUX_SHRINKER_H */