From patchwork Mon Nov 19 10:34:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 151475 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2490101ljp; Mon, 19 Nov 2018 02:35:04 -0800 (PST) X-Google-Smtp-Source: AJdET5eDlYicqOnL+Ou/8udlaEu3YE+iIbICm8QLcg4jO9wCN+jUNHPHOoRYQYPQlTYxqRa+Yd5T X-Received: by 2002:aa7:868f:: with SMTP id d15mr12588043pfo.225.1542623704101; Mon, 19 Nov 2018 02:35:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542623704; cv=none; d=google.com; s=arc-20160816; b=CzmpHrKtkLt+/K19PB5Gz1QhHUMN16P5D2ergwAZZdRKc/REuZ54qkpbmk/xAUv0OJ 7Sn9qCiQ2GmK03QSEdNHkwswh2/N/JtA5bl7xV8l1wB+ZC6pnbagyIEeuuCYYNlGUnyt YTjYhpTqXciE38/frErFb2ybyQ0znf8Gh4fuKlYSyv7ZZHpp0loh0NcSQL++8H9qQUWf +f9PfmOYKd0BQXVzbIslL7WfXly4dH0vO6JPOIke4HOUDQvYVobi/WA4hAlN3AtRlvfq NLfWz4UpgIJjg7tuyzeiPOJJe40+8299m/25VQs14ydwiV01FZJxVj/0z33ApbFKDwBR L96Q== 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=oBc3JwPq73FtDGvqk3t8T7Oot3rzsOXj87W1YQabmq0=; b=GNvgQjsCN2KU3s/hoXcfGUX/d8xfEvMOcZ/V8v8Phqu1u2uQnB2VOaarKHU636yqdt 2v/PdYr4QgR/Zn0GbfdbZZFWefAi+CYk3y8iEoNX1+acRy0MF2UGH48L2gp05zE7cIGZ MlOO6Olb/qbsTd6E/IuhkFlNck3SIVLX2myKUeeev3CXsaf14rCBtLhM40g7XLRRQCHa NXwr2Z8DpIF1PXbrgCRy/o0wY41XRXvzbqtaXrX0Bamsn1LPvTFvq7KCnj4oEBrq8Kke XeY0HssxEjtgABJTYGWAcHHxWsuIZC3X0gRoz0U+HIlWi3j1vKNZ4dq5D/0/+hheAixr Gqxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U+uluio6; 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 j21si21723894pll.150.2018.11.19.02.35.03; Mon, 19 Nov 2018 02:35:04 -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=U+uluio6; 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 S1728407AbeKSU6N (ORCPT + 32 others); Mon, 19 Nov 2018 15:58:13 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44867 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728383AbeKSU6N (ORCPT ); Mon, 19 Nov 2018 15:58:13 -0500 Received: by mail-wr1-f65.google.com with SMTP id j17-v6so31411270wrq.11 for ; Mon, 19 Nov 2018 02:34:59 -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=oBc3JwPq73FtDGvqk3t8T7Oot3rzsOXj87W1YQabmq0=; b=U+uluio6KwtbMMoH3Jp0DEoAQtuhcEmvMYrNiM5KHAwwCapWC33wQhLaMnZr9S/I/0 Z6sK2Z1/uUcwEavzu8hwJhNC29Gt2B+bLxPWg0ogiXB9yWoJOlUzzK8ssUxgRpXHV3EU XnLEDqKsSc9kSrVv/zIWFoLbWLaZfx4laO4js= 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=oBc3JwPq73FtDGvqk3t8T7Oot3rzsOXj87W1YQabmq0=; b=WsGQjUToaB2LpC5awbQ4mNvLCVeluPq6ReSPmeSjlCvNUnoeUwLU3XmGzLCoM0Z0Ix 8kDdWJfJVpQTBWtww86EKz/D9JxuZIBx2ycT2fJgIHmtqC7VEJUnCLoX28woQxh4k121 4uTvyl8Qhg+jkvmopoOx+1Yet1N1mbfitEHyQ9JN8qxvJ9STGVlU8HNXVHJV1baTRiMC 2x64PgggedpmrMAKfArFRQQfbI5z2Rcl5cH41+Vv2ZBauOf6QK6VfTXXPXvFjlYxUuIC efhCKCTQU+I31uSBR8NPwPtTRDN4XDvVE2/LSSp1BYFg8UPC9GDLF/M9SVzhop4fujSZ Arbw== X-Gm-Message-State: AGRZ1gKkJYAMsw8nHwMLgqmejzOr+cZMmOvjF6y1tJIUpBU1Z4fSvlvX weVF8YRA3AneXWPGU6qW52v7WQ== X-Received: by 2002:a5d:4708:: with SMTP id y8-v6mr17551672wrq.16.1542623698837; Mon, 19 Nov 2018 02:34:58 -0800 (PST) Received: from localhost.localdomain ([37.162.18.180]) by smtp.gmail.com with ESMTPSA id e9sm14973298wro.16.2018.11.19.02.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Nov 2018 02:34:58 -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 V2 08/10] block, throttle: allow sharing cgroup statistic files Date: Mon, 19 Nov 2018 11:34:22 +0100 Message-Id: <20181119103424.3853-9-paolo.valente@linaro.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20181119103424.3853-1-paolo.valente@linaro.org> References: <20181119103424.3853-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 6bfdaac53b6f..95825448c031 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, },