[Devel] [PATCH RHEL7 COMMIT] kstat: Drop global kstat_lat_struct
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Dec 20 12:00:08 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-693.11.1.vz7.39.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.11.1.vz7.39.8
------>
commit 3d2a7486806d63e64f5960856c32936b3150e677
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Wed Dec 20 12:00:08 2017 +0300
kstat: Drop global kstat_lat_struct
Nobody uses it since swap_in is converted to percpu interface.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
include/linux/vzstat.h | 8 --------
kernel/ve/vzstat_core.c | 25 -------------------------
2 files changed, 33 deletions(-)
diff --git a/include/linux/vzstat.h b/include/linux/vzstat.h
index 5050bc194505..879b93b5aad2 100644
--- a/include/linux/vzstat.h
+++ b/include/linux/vzstat.h
@@ -28,10 +28,6 @@ struct kstat_lat_pcpu_snap_struct {
seqcount_t lock;
} ____cacheline_aligned_in_smp;
-struct kstat_lat_struct {
- struct kstat_lat_snap_struct cur, last;
- u64 avg[3];
-};
struct kstat_lat_pcpu_struct {
struct kstat_lat_pcpu_snap_struct *cur;
u64 max_snap;
@@ -109,18 +105,14 @@ extern void KSTAT_PERF_ADD(struct kstat_perf_pcpu_struct *ptr, u64 real_time,
sleep_time = current->se.statistics->sum_sleep_runtime - sleep_time; \
KSTAT_PERF_ADD(&kstat_glob.name, start, start - sleep_time);
-extern void KSTAT_LAT_ADD(struct kstat_lat_struct *p, u64 dur);
extern void KSTAT_LAT_PCPU_ADD(struct kstat_lat_pcpu_struct *p, int cpu, u64 dur);
-extern void KSTAT_LAT_UPDATE(struct kstat_lat_struct *p);
extern void KSTAT_LAT_PCPU_UPDATE(struct kstat_lat_pcpu_struct *p);
#else
#define KSTAT_PERF_ADD(ptr, real_time, cpu_time)
#define KSTAT_PERF_ENTER(name)
#define KSTAT_PERF_LEAVE(name)
-#define KSTAT_LAT_ADD(p, dur)
#define KSTAT_LAT_PCPU_ADD(p, cpu, dur)
-#define KSTAT_LAT_UPDATE(p)
#define KSTAT_LAT_PCPU_UPDATE(p)
#define KSTAT_LAT_PCPU_UPDATE(p)
#endif
diff --git a/kernel/ve/vzstat_core.c b/kernel/ve/vzstat_core.c
index c179c9fb851b..24a0e1e56101 100644
--- a/kernel/ve/vzstat_core.c
+++ b/kernel/ve/vzstat_core.c
@@ -24,19 +24,6 @@ void KSTAT_PERF_ADD(struct kstat_perf_pcpu_struct *ptr, u64 real_time, u64 cpu_t
put_cpu_ptr(cur);
}
-/*
- * Add another statistics reading.
- * Serialization is the caller's due.
- */
-void KSTAT_LAT_ADD(struct kstat_lat_struct *p,
- u64 dur)
-{
- p->cur.count++;
- if (p->cur.maxlat < dur)
- p->cur.maxlat = dur;
- p->cur.totlat += dur;
-}
-
/*
* Must be called with disabled interrupts to remove any possible
* locks and seqcounts under write-lock and avoid this 3-way deadlock:
@@ -74,18 +61,6 @@ void KSTAT_LAT_PCPU_ADD(struct kstat_lat_pcpu_struct *p, int cpu,
* Move current statistics to last, clear last.
* Serialization is the caller's due.
*/
-void KSTAT_LAT_UPDATE(struct kstat_lat_struct *p)
-{
- u64 m;
- memcpy(&p->last, &p->cur, sizeof(p->last));
- p->cur.maxlat = 0;
- m = p->last.maxlat;
- CALC_LOAD(p->avg[0], EXP_1, m)
- CALC_LOAD(p->avg[1], EXP_5, m)
- CALC_LOAD(p->avg[2], EXP_15, m)
-}
-EXPORT_SYMBOL(KSTAT_LAT_UPDATE);
-
void KSTAT_LAT_PCPU_UPDATE(struct kstat_lat_pcpu_struct *p)
{
unsigned i, cpu;
More information about the Devel
mailing list