[Devel] [PATCH RHEL8 COMMIT] ve/vzstat.h: move some kstat definitions into new header
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 24 20:09:57 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.32
------>
commit 2ccfca726e576c9c6ed072d1fd2dfafbeac11280
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Mon May 24 19:38:11 2021 +0300
ve/vzstat.h: move some kstat definitions into new header
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 <aryabinin at virtuozzo.com>
(cherry-picked from vz7 commit c98a0fae0c9a ("ve/vzstat.h: move some kstat
definitions into new header"))
To_merge: 32a31d2ad5e7 ("vzstat: Add base kstat structures and variables")
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
include/linux/kstat.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/vzstat.h | 47 ++++++-----------------------------------------
2 files changed, 54 insertions(+), 41 deletions(-)
diff --git a/include/linux/kstat.h b/include/linux/kstat.h
new file mode 100644
index 000000000000..4fff25bcb93f
--- /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 758d766d1d59..0f18110b140a 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;
More information about the Devel
mailing list