Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3880897imu; Mon, 12 Nov 2018 01:59:43 -0800 (PST) X-Google-Smtp-Source: AJdET5eRqrSs/zB6wj14gdGVnQ/TBWPcGlA6GPtmYr0pnuIdIqjVLyzCIfJLaUHCrswDEC1kdW9/ X-Received: by 2002:a17:902:b7cc:: with SMTP id v12-v6mr284724plz.278.1542016782967; Mon, 12 Nov 2018 01:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542016782; cv=none; d=google.com; s=arc-20160816; b=n7Xk76vFASMnNa4ffu45PZXbUhgwnCUBydfrx5Y8rFOITZYePPSF98adg4batc49m9 Vh0Fd2WHCiL3DSrLgwCthxx80SZXE5jJH2atPcQ8GADF8Y04En/ScWR/8hknHcBfrCj8 eba+NbHtTwelbFDVeUU82UMyBOgvbUP40Q2fNmQ9f1phYLkDGYKvBs0W2/kBaxDVOows aq2U5wrLiHq11sWHgo0Sic+8gXiJtPkX+0h8yRX2oGW2ggG9hVwpeeP7QcsrgnLARPOc 1rfei+hTx9xaET+dkgJVN7leHCBBc5gulmkQfkTbGcFz4jxZyDZqAwL9j6/3+XuE6O5r BoFQ== 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 i33-v6si16697106pld.433.2018.11.12.01.59.28; Mon, 12 Nov 2018 01:59:42 -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 S1729381AbeKLTt6 (ORCPT + 99 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(-) 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