From: Andrey Ryabinin <[email protected]>

Move some definitions into kstat.h, so we could use later
in other headers (sched.h)

https://jira.sw.ru/browse/PSBM-81395
Signed-off-by: Andrey Ryabinin <[email protected]>

(cherry-picked from c98a0fae0c9a854d1eb90c56a78c84572837764f)
Signed-off-by: Andrey Zhadchenko <[email protected]>
---
 include/linux/kstat.h  | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/vzstat.h | 47 ++++++-----------------------------------------
 2 files changed, 54 insertions(+), 41 deletions(-)
 create mode 100644 include/linux/kstat.h

diff --git a/include/linux/kstat.h b/include/linux/kstat.h
new file mode 100644
index 0000000..4fff25b
--- /dev/null
+++ b/include/linux/kstat.h
@@ -0,0 +1,48 @@
+#ifndef __LINUX_KSTAT_H
+#define __LINUX_KSTAT_H
+
+enum {
+       KSTAT_ALLOCSTAT_ATOMIC,
+       KSTAT_ALLOCSTAT_LOW,
+       KSTAT_ALLOCSTAT_HIGH,
+       KSTAT_ALLOCSTAT_LOW_MP,
+       KSTAT_ALLOCSTAT_HIGH_MP,
+       KSTAT_ALLOCSTAT_NR,
+};
+
+struct kstat_perf_snap_struct {
+       u64 wall_tottime, cpu_tottime;
+       u64 wall_maxdur, cpu_maxdur;
+       unsigned long count;
+};
+
+struct kstat_perf_pcpu_snap_struct {
+       u64 wall_tottime, cpu_tottime;
+       u64 wall_maxdur, cpu_maxdur;
+       unsigned long count;
+       seqcount_t lock;
+};
+
+struct kstat_perf_pcpu_struct {
+       struct kstat_perf_pcpu_snap_struct *cur;
+       struct kstat_perf_snap_struct last;
+};
+
+struct kstat_lat_snap_struct {
+       u64 maxlat, totlat;
+       unsigned long count;
+};
+
+struct kstat_lat_pcpu_snap_struct {
+       u64 maxlat, totlat;
+       unsigned long count;
+} ____cacheline_aligned_in_smp;
+
+struct kstat_lat_pcpu_struct {
+       struct kstat_lat_pcpu_snap_struct *cur;
+       u64 max_snap;
+       struct kstat_lat_snap_struct last;
+       u64 avg[3];
+};
+
+#endif
diff --git a/include/linux/vzstat.h b/include/linux/vzstat.h
index 758d766..0f18110 100644
--- a/include/linux/vzstat.h
+++ b/include/linux/vzstat.h
@@ -9,39 +9,13 @@
 #define __VZSTAT_H__
 
 #include <linux/mmzone.h>
+#include <linux/kstat.h>
 
-struct kstat_lat_snap_struct {
-       u64 maxlat, totlat;
-       unsigned long count;
-};
-struct kstat_lat_pcpu_snap_struct {
-       u64 maxlat, totlat;
-       unsigned long count;
-} ____cacheline_aligned_in_smp;
-
-struct kstat_lat_pcpu_struct {
-       struct kstat_lat_pcpu_snap_struct *cur;
-       u64 max_snap;
-       struct kstat_lat_snap_struct last;
-       u64 avg[3];
-};
-
-struct kstat_perf_snap_struct {
-       u64 wall_tottime, cpu_tottime;
-       u64 wall_maxdur, cpu_maxdur;
-       unsigned long count;
-};
-
-struct kstat_perf_pcpu_snap_struct {
-       u64 wall_tottime, cpu_tottime;
-       u64 wall_maxdur, cpu_maxdur;
-       unsigned long count;
-       seqcount_t lock;
-};
-
-struct kstat_perf_pcpu_struct {
-       struct kstat_perf_pcpu_snap_struct *cur;
-       struct kstat_perf_snap_struct last;
+struct swap_cache_info_struct {
+       unsigned long add_total;
+       unsigned long del_total;
+       unsigned long find_success;
+       unsigned long find_total;
 };
 
 struct kstat_zone_avg {
@@ -50,15 +24,6 @@ struct kstat_zone_avg {
                                nr_inactive_avg[3];
 };
 
-enum {
-       KSTAT_ALLOCSTAT_ATOMIC,
-       KSTAT_ALLOCSTAT_LOW,
-       KSTAT_ALLOCSTAT_HIGH,
-       KSTAT_ALLOCSTAT_LOW_MP,
-       KSTAT_ALLOCSTAT_HIGH_MP,
-       KSTAT_ALLOCSTAT_NR,
-};
-
 struct kernel_stat_glob {
        unsigned long nr_unint_avg[3];
        seqcount_t nr_unint_avg_seq;
-- 
1.8.3.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to