[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181112095632.69114-11-paolo.valente@linaro.org>
Date: Mon, 12 Nov 2018 10:56:30 +0100
From: Paolo Valente <paolo.valente@...aro.org>
To: Jens Axboe <axboe@...nel.dk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
Angelo Ruocco <angeloruocco90@...il.com>,
Dennis Zhou <dennis@...nel.org>,
Josef Bacik <josef@...icpanda.com>,
Liu Bo <bo.liu@...ux.alibaba.com>,
Bart Van Assche <bvanassche@....org>,
Johannes Weiner <hannes@...xchg.org>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
ulf.hansson@...aro.org, linus.walleij@...aro.org,
broonie@...nel.org, bfq-iosched@...glegroups.com,
oleksandr@...alenko.name, cgroups@...r.kernel.org,
linux-doc@...r.kernel.org, Jonathan Corbet <corbet@....net>,
Paolo Valente <paolo.valente@...aro.org>
Subject: [PATCH 10/12] block, throttle: allow sharing cgroup statistic files
From: Angelo Ruocco <angeloruocco90@...il.com>
Some of the cgroup files defined in the throttle policy have the same
meaning as those defined in the proportional share policy.
This commit uses the new file sharing interface in cgroup to share
these files.
Signed-off-by: Angelo Ruocco <angeloruocco90@...il.com>
Signed-off-by: Paolo Valente <paolo.valente@...aro.org>
---
block/blk-throttle.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 5c43821dc528..239957c12d34 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1491,22 +1491,30 @@ static struct cftype throtl_legacy_files[] = {
.write = tg_set_conf_uint,
},
{
- .name = "throttle.io_service_bytes",
+ .name = "io_service_bytes",
+ .owner_name = "throttle",
+ .flags = CFTYPE_SHARES_FILE,
.private = (unsigned long)&blkcg_policy_throtl,
.seq_show_cft = blkg_print_stat_bytes,
},
{
- .name = "throttle.io_service_bytes_recursive",
+ .name = "io_service_bytes_recursive",
+ .owner_name = "throttle",
+ .flags = CFTYPE_SHARES_FILE,
.private = (unsigned long)&blkcg_policy_throtl,
.seq_show_cft = blkg_print_stat_bytes_recursive,
},
{
- .name = "throttle.io_serviced",
+ .name = "io_serviced",
+ .owner_name = "throttle",
+ .flags = CFTYPE_SHARES_FILE,
.private = (unsigned long)&blkcg_policy_throtl,
.seq_show_cft = blkg_print_stat_ios,
},
{
- .name = "throttle.io_serviced_recursive",
+ .name = "io_serviced_recursive",
+ .owner_name = "throttle",
+ .flags = CFTYPE_SHARES_FILE,
.private = (unsigned long)&blkcg_policy_throtl,
.seq_show_cft = blkg_print_stat_ios_recursive,
},
--
2.16.1
Powered by blists - more mailing lists