From patchwork Mon Nov 12 09:56:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 150808 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2947990ljp; Mon, 12 Nov 2018 01:57:34 -0800 (PST) X-Google-Smtp-Source: AJdET5dbubmYo9xtnWYBlNlZZoj+xX466redX0dt3BNnfEEmltZojwMbWR8hz/vWDpk9dgtqg/ej X-Received: by 2002:a63:5026:: with SMTP id e38mr241133pgb.123.1542016654307; Mon, 12 Nov 2018 01:57:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542016654; cv=none; d=google.com; s=arc-20160816; b=ht4uBYMV7CwJ4qfjkWZTJ0VAesMaNX6rfWB9Oj6zuCfvkZwIDSAlQr79KUJGmFFsER XaFbz3/Y/yNV+frUVH5F6wqu60BYboOOWIhNJTsSruDjE7Ujm95mDBuSefZ5CtyS919z CnumUJMsNl+7OgaYtr3MCU0bs0LpwmOMiJh8wQCKJivu9e9Mt/JKF91rVo41Jvq21RA2 w+/xZV2KqhV2eFS+SbBtYLDjgHgEAyE3aNfOS7P3d0QmpAJXbRg6jD4lqd0SkPNa9Uyp kJRAXXhmlfk7ao2irvkNp5aTnJkm8bHsFSszR4VYjz2N23ZCNw0WxEPMKdRBtRlO52eE 4rPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=tJzqIZ4whiBiBt1HUGz+jcfYWcwBBnR88Hf7l4Y3mww=; b=TYUM8/U5mKsYTvoxN4/32CaSKfBIrNzmBCm6A/dfoD1YMC/BMIUoc6JLsd5/aBQyGB +MBlo50H+6ImyGJuafnevyfoAw3NeVX0ivoWeS9GBtFsNh4uyOD2RcoBLt6gJ7nvSln7 y7ul2cUG0qQ15UjVGK3Kg5HcgVnd37YWuZUmiCJawN2hH81nj6cnLOXFlk7wGMArJeyL sVvZS1r7y65BBBoNMt3ZgX9EBFrkfOtGYn+Mk+uTN3YG3T3hQGs0z2oNn7xlXsLz0NRh iGVgjF4azOheqdBApOOcUpYQoOc53NbVJ03VvKYaa88ec4StfjEd7ZRPSVQMKGxS/HFW Z1Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FDIijxyz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d139-v6si17814084pfd.93.2018.11.12.01.57.33; Mon, 12 Nov 2018 01:57:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FDIijxyz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729387AbeKLTt6 (ORCPT + 32 others); Mon, 12 Nov 2018 14:49:58 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38612 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729343AbeKLTt5 (ORCPT ); Mon, 12 Nov 2018 14:49:57 -0500 Received: by mail-wm1-f65.google.com with SMTP id f2-v6so7461593wme.3 for ; Mon, 12 Nov 2018 01:57:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tJzqIZ4whiBiBt1HUGz+jcfYWcwBBnR88Hf7l4Y3mww=; b=FDIijxyzwzKUw8K/20a1vK7NhMkivhaxGdBShwBbInbBKMPrlnQRfW4Q14WNLJlAgk +5kolkin8wKT5bN1KavHsyCPbdwxMplfi0IRkntZ056n0gKQV+UuCM8samekxvyVvzGV rA+3TSy9ixB0Rhl9TjcTj+dGLIzKf73wxGTX4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tJzqIZ4whiBiBt1HUGz+jcfYWcwBBnR88Hf7l4Y3mww=; b=Yn1ZcOZW1WLQPoupo7djaxDykIsDBTLQVRF7wfM7h/WPlrVPyViDmsp0p6sR5xLBE9 u2MGs8MCWVzc6D12lBK2aoxvgnLIfATvfZdqrzdcqnxEwvv66curDtTd2jn+Dh+u57sv tSW9lIZIiiFxnBuOzIZKVLWOGsg1leNjD+4q403Mh37+7610I9eot/7l+tpzX9m9T7R9 DuPOHMYLxzfPd/j94Qr4E8lQpif40ixPhhf7w1oNjE1o0N1z2uGUa7mJ0WJ/67ougUqY TEBhN7Tk6CzNxGiYk4L9HAH0fVf9ezGUHEw2oC2T6LyrxEed8cZVm/QdYNOrkNFzAr8f F/qA== X-Gm-Message-State: AGRZ1gJNQ0Gd+ipziPh/0pV4AoH0hoEFf4/cHd5avBAPpF8l5arjtsaz MRkbXpMVVR1uYA4d1ajG7ZgBeg== X-Received: by 2002:a1c:58c5:: with SMTP id m188-v6mr6705885wmb.85.1542016647902; Mon, 12 Nov 2018 01:57:27 -0800 (PST) Received: from localhost.localdomain ([93.68.220.21]) by smtp.gmail.com with ESMTPSA id r14-v6sm21273089wro.8.2018.11.12.01.57.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 01:57:27 -0800 (PST) From: Paolo Valente To: Jens Axboe , Greg Kroah-Hartman , Tejun Heo , Li Zefan , Angelo Ruocco , Dennis Zhou , Josef Bacik , Liu Bo , Bart Van Assche , Johannes Weiner Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, linus.walleij@linaro.org, broonie@kernel.org, bfq-iosched@googlegroups.com, oleksandr@natalenko.name, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, Jonathan Corbet , Paolo Valente Subject: [PATCH 10/12] block, throttle: allow sharing cgroup statistic files Date: Mon, 12 Nov 2018 10:56:30 +0100 Message-Id: <20181112095632.69114-11-paolo.valente@linaro.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20181112095632.69114-1-paolo.valente@linaro.org> References: <20181112095632.69114-1-paolo.valente@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Angelo Ruocco 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 Signed-off-by: Paolo Valente --- block/blk-throttle.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) -- 2.16.1 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, },