Package init

This commit is contained in:
dogsheng 2019-12-25 15:57:46 +08:00
parent 8f0025ab9f
commit a9b4698c52
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From 9eb93c62629d7d0eb42c941d6368455749171258 Mon Sep 17 00:00:00 2001
From: zhangsong <zhangsong34@huawei.com>
Date: Wed, 9 Oct 2019 07:24:50 +0800
Subject: [PATCH] lxcfs: proc_diskstats_read func obtain data from
'blkio.throttle.*'
reason:There are many scheduler in linux kernel, such as cfq, bfq, deadline,
etc. However, 'blkio.[a-z_]+' is for cfq, there is nothing provided when OS uses
other scheduler. Cgroup block controller throttle works at generic block layer
which could collect serviced and serviced_bytes information for every scheduler.
Signed-off-by: zhangsong <zhangsong34@huawei.com>
---
bindings.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bindings.c b/bindings.c
index e7138f8..a76483c 100644
--- a/bindings.c
+++ b/bindings.c
@@ -4222,11 +4222,13 @@ static int proc_diskstats_read(char *buf, size_t size, off_t offset,
return read_file("/proc/diskstats", buf, size, d);
prune_init_slice(cg);
- if (!(io_serviced_str = cgfs_get_value("blkio", cg, "blkio.io_serviced_recursive")))
+ if (!(io_serviced_str = cgfs_get_value("blkio", cg, "blkio.throttle.io_serviced_recursive"))
+ && !(io_serviced_str = cgfs_get_value("blkio", cg, "blkio.throttle.io_serviced")))
goto err;
if (!(io_merged_str = cgfs_get_value("blkio", cg, "blkio.io_merged_recursive")))
goto err;
- if (!(io_service_bytes_str = cgfs_get_value("blkio", cg, "blkio.io_service_bytes_recursive")))
+ if (!(io_service_bytes_str = cgfs_get_value("blkio", cg, "blkio.throttle.io_service_bytes_recursive"))
+ && !(io_service_bytes_str = cgfs_get_value("blkio", cg, "blkio.throttle.io_service_bytes")))
goto err;
if (!(io_wait_time_str = cgfs_get_value("blkio", cg, "blkio.io_wait_time_recursive")))
goto err;
--
2.21.0

View File

@ -29,6 +29,7 @@ Patch9016: 0016-lxcfs-fix-concurrency-problem.patch
Patch9017: 0017-diskstats-support-devicemapper-device.patch
Patch9018: 0018-lxcfs-add-proc-partitions.patch
Patch9019: 0019-use-bitwise-operators-only-on-unsigned.patch
Patch9020: 0020-lxcfs-proc_diskstats_read-func-obtain-data-from-blki.patch
#Dependency
BuildRequires: autoconf automake libtool help2man