From patchwork Mon Nov 19 10:34:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 151467 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2489731ljp; Mon, 19 Nov 2018 02:34:41 -0800 (PST) X-Google-Smtp-Source: AJdET5dpWSjbxjlDXxe/zhrdUhWx8VagMLOXbobCRiNbn2o7yp6M7WYGndnnq2XQWIKtUxqcdIOP X-Received: by 2002:a63:6782:: with SMTP id b124mr19781004pgc.151.1542623680927; Mon, 19 Nov 2018 02:34:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542623680; cv=none; d=google.com; s=arc-20160816; b=x5tZviKn09Gf3kse57jrRfy9fGuQAYaYsvbdLeaC+ygujm++aejwnEKTkrOi+HQos+ lF9thAPBdTIcq8bJYqCllqXtpTrsj0ZKDrJBb9r9uEJc4wESrETVctZ0x8nSKR/6zXz0 CFgfQaG17GWyQrZP3Lzh+H2S4yQSpcX+27kJqTlInumo6KE/eYTupOq8+y1x8Knd/GrZ iRSFhd9bILe5Yy9nYYJqr5HWZojn7RBtsiB6RmYbhbPNbSKTxneI7Hj3CVgIk/I/wzl+ 2/MNk6/UUyeDucGjO4yo1kfOFPncXWR/iGiMfsfM8ohNi8xMe3oNXWoL5J5UuINDBla/ 9jNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=iL05uSSIvpNAEkXjPa4LLsPBFMnCpnvcdfAc7Vp2A5U=; b=a9XZZjppfxSIpzMkaCRcaH+L/lWqKI8e00plzhKPhvz4x75HLhvq4k4GyChur79Dl3 i0+26RThZyjCmSSZ5aqtocwE2GAo4k88FJlnLX4TKkzQsDYZlYCW9Np53Yk6Mk/+RdxJ 7whuEDBphi+WdUwKiqdw2NtJvh3dS1f4K6+K6jEL7nxff00jHSt6rQJ/vp0g7jxBJk3x +tL2BA8hvvSj2y9auR4HAUt30kH9yM8t4NF+YSmy/Vja0rKIkGlC6w5s2ePaUU0zqTMd LtlTyMCiZm4UfMn5e+kVSh6AXAdVxQ8m/sQeX98//9icrh5DlF5Krb1Ag+DgS592Kt7g LYfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J2hxaN5C; 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 189si37525025pgh.320.2018.11.19.02.34.40; Mon, 19 Nov 2018 02:34:40 -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=J2hxaN5C; 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 S1727778AbeKSU5u (ORCPT + 32 others); Mon, 19 Nov 2018 15:57:50 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40959 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727619AbeKSU5t (ORCPT ); Mon, 19 Nov 2018 15:57:49 -0500 Received: by mail-wr1-f67.google.com with SMTP id p4so22273244wrt.7 for ; Mon, 19 Nov 2018 02:34:36 -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; bh=iL05uSSIvpNAEkXjPa4LLsPBFMnCpnvcdfAc7Vp2A5U=; b=J2hxaN5CgQwX3XH/86Da0A57BLs8NYJ8juPTSrnowTgszBdtNhDye09DYxM78q2BE+ +ZHxy5iCAg9M4JKk1wT00JAcjorZhunK9l42+pYRJuPsgH6GZFCS5IXb0Hy8SVdgc/Mk SD9HgD6PUDRerWtSHLriKPYP1sBOyjQxUVX0o= 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; bh=iL05uSSIvpNAEkXjPa4LLsPBFMnCpnvcdfAc7Vp2A5U=; b=lR/47b6gvsOy3CTGu6ElHZCg5zPX+i4zVtcwv4rVn3Tls4P8N9hM/MLkYZLGspDwXy SkHX9dShJjq/x1Kj5fE3LVftNucy2wq0IpsS2lIVFhFM1s7cvA+EsKub2LD/Wyb1jYi3 Rbkc8ERVg6Lf+RSsuszMJLadWIVckGEERFBmgeOR6gOaLqNurJeq+RXLP+VUYM9ii6LZ Fe9bk/WY3F3AY8hXUpRpLj78MVWDlmLU8u7uDtq+/XblLi/sSJi4Uy8uNzSp/qq6x188 GWGNuONddfr52dMlb28tmQOFwcvM4Yp1oaHrMYzqiJ8r3Qfn9KOOCT7IV/2AKOFs7bjR BNAw== X-Gm-Message-State: AGRZ1gL5Ky/H3N38ZyeCEafdWAi7ByzYfxVRkHy1l3DT0lorNS2Kq+6x TFrJoWRlnJ/5Q3d4J5CQifMV8Q== X-Received: by 2002:a5d:4708:: with SMTP id y8-v6mr17550396wrq.16.1542623675257; Mon, 19 Nov 2018 02:34:35 -0800 (PST) Received: from localhost.localdomain ([37.162.18.180]) by smtp.gmail.com with ESMTPSA id e9sm14973298wro.16.2018.11.19.02.34.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Nov 2018 02:34:34 -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 00/10] unify the interface of the proportional-share policy in blkio/io Date: Mon, 19 Nov 2018 11:34:14 +0100 Message-Id: <20181119103424.3853-1-paolo.valente@linaro.org> X-Mailer: git-send-email 2.16.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, here is the V2 of this patch series. Let me rephrase the description of the series, in view of the fact that CFQ will be gone with legacy block. The current implementation of cgroups doesn't allow two or more entities, e.g., I/O schedulers, to share the same files. Thus, to enable people to set group weights with BFQ, I resorted to making BFQ create its own version of the same interface files used by CFQ (before going away with legacy block), by prepending a bfq prefix. Actually, no legacy code uses these different names, or is likely to do so. Having these two sets of names is simply a source of confusion, as pointed out also, e.g., by Lennart Poettering (CCed here), and acknowledged by Tejun [2]. In [1] we agreed on a solution that solves this problem, by actually making it possible to share cgroups files. Both writing to and reading from a shared file trigger the appropriate operation for each of the entities that share the file. In particular, in case of reading, - if all entities produce the same output, the this common output is shown only once; - if the outputs differ, then every per-entity output is shown, followed by the name of the entity that produced that output. With this solution, legacy code that, e.g., sets group weights, just works, regardless of the I/O scheduler actually implementing proportional share. But note that this extension is not restricted to only blkio/io. The general group interface now enables files to be shared among multiple entities of any kind. (I have also added a patch to fix some clerical errors in bfq doc, which I found while making the latter consistent with the new interface.) CHANGES FROM V1: - Removed patch that introduced a function to only find kernfs nodes, without increasing ref counters - Changed commit messages and BFQ documentation, to comply with the fact that there won't be CFQ any longer Thanks, Paolo Angelo Ruocco (5): cgroup: link cftypes of the same subsystem with the same name cgroup: add owner name to cftypes block, bfq: align min and default weights with the old cfq default cgroup: make all functions of all cftypes be invoked block, throttle: allow sharing cgroup statistic files Paolo Valente (5): cgroup: add hook seq_show_cft with also the owning cftype as parameter block, cgroup: pass cftype to functions that need to use it block, bfq: use standard file names for the proportional-share policy doc, bfq-iosched: fix a few clerical errors doc, bfq-iosched: make it consistent with the new cgroup interface Documentation/block/bfq-iosched.txt | 34 ++--- block/bfq-cgroup.c | 148 +++++++++++++------- block/bfq-iosched.h | 4 +- block/blk-cgroup.c | 22 +-- block/blk-throttle.c | 24 ++-- include/linux/blk-cgroup.h | 10 +- include/linux/cgroup-defs.h | 14 +- include/linux/cgroup.h | 13 ++ kernel/cgroup/cgroup.c | 262 +++++++++++++++++++++++++++++------- 9 files changed, 390 insertions(+), 141 deletions(-) -- 2.16.1