Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3882212imu; Mon, 12 Nov 2018 02:01:06 -0800 (PST) X-Google-Smtp-Source: AJdET5duyJXMwm8pP+IurVxVq5Y23nENUcNKlI1mrGbYuWMW6rfd3F1Qha2+1Sreb/Ibz5VUiOEV X-Received: by 2002:a62:c104:: with SMTP id i4-v6mr258785pfg.133.1542016866225; Mon, 12 Nov 2018 02:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542016866; cv=none; d=google.com; s=arc-20160816; b=y6vghMh1ac1WQF7GKIv/Pvf2NqlCHwRnnMIcoJ+JZrfEGlXNMw9Dx/Vkic+1VPtbHm o7lolwbVvJlUffI2PNMTd0WrzJU0PBFX7svq6fPEYvMJzn08+9DRGxxnrC5CNOPWH+fl ZDWedXheMqJhqUmz6YxWIvNPgj80HZBnqexh5mGXlz4mCBP+zrTblb/VKYM7jBhzDuaL u5Qj8vG6zdmo73QrFkQRQnh90LSiXQSi7mWxD9eXDzQk1SxF3I4ajjJiFBzyzFAOSmz7 mDHs6wuYJfobqOWT18IlMzGCqkcCZZsD5v0teHdbDhLiFoHV15R5nYYExhBcytjXVt4v so3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=9fSKAzP9ruRBEA1MT9Z13pRnkDRt7j8j4EnmxP10Ums=; b=eQ9VfGTEyI99Jh3OL9CEt/jjSrRNlMzHFycJxFHEwX7MLV7puNPFeLvJlbUOjzqanS 8vnWLipwaSfRhbV9ImtR5LQXuJuQuBzmNhaEXhYQbsOKSPLj8s3MjRb6T4u5UiuY7sdD L4Rb3yLJkvig+RMB3etx+4UVyihkNCx4XknUQqZlzMfK2n+v4fdVVBYViVt4WkolvstQ joq1WCHLkBeL9KsMpPf+J+T9Fim+L1Mq3LWZvj5VSXkXpDMv/q++4jVKphR6aXiyrKD+ 4xHJWYMFbJY0sQurL6+lGtFcRfhmIztqcGxTzkZhyeO4FUfswsxbDyUbOcTua5rz/0pQ Tnvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PCZFuQEn; 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 k6si16977860pgr.500.2018.11.12.02.00.51; Mon, 12 Nov 2018 02:01:06 -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=PCZFuQEn; 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 S1729465AbeKLTvD (ORCPT + 99 others); Mon, 12 Nov 2018 14:51:03 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34893 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728176AbeKLTvD (ORCPT ); Mon, 12 Nov 2018 14:51:03 -0500 Received: by mail-wm1-f67.google.com with SMTP id t15-v6so7520810wmt.0 for ; Mon, 12 Nov 2018 01:58:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9fSKAzP9ruRBEA1MT9Z13pRnkDRt7j8j4EnmxP10Ums=; b=PCZFuQEnWqBGooqnIOMnX/hRrLxg2cS/5rByMG9iV8msjbZWdJqOweg452LQc/NV+n IDjltLKRCB3UVBn8nvUqb5TsYJ+U2sGuvj1BPAYLWwg1H/iZLkatkttOs5E+ukee07H4 QMcdsTA6dgj2iuYNuC16+mA852flmhuC3Kf1c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9fSKAzP9ruRBEA1MT9Z13pRnkDRt7j8j4EnmxP10Ums=; b=aZ4uP0k20cbouRVEyYXystBANxokP475sFeUGggWdbuwc40QeSwz91xIPHlc1YwoJo wv11iLKwg/XL22uMTxA9yXlx5y+3TyVgES6BhDuFz6+qvqya7a82XF4ui9+53XIV6UV9 a//w/Y4nqbMbPy9VJZHsVANU893P4JNr8lM1jXj65qDEPIZHhgbqMF7/3Oj6ktBdoPz+ PQHfm6t3z5MG7G1dHwhZT9RVDStCB6g9d18MvzuMfIFJHfKceYhTZTAu19eNqCQCr6ne vUcmpzOyVSzE1oHmaTGaJYL9kVMaulUbECncFVEhGssuOwmbLo4hKrNMf01PZe75+GO2 htfw== X-Gm-Message-State: AGRZ1gL3or8uRxle6M+eJpMMG50FwgE8csJ2qy1saOab69oP7mSeFlT2 hGB81gvZ5lK2kkiTnYjQLhpOhA== X-Received: by 2002:a1c:c10b:: with SMTP id r11mr940555wmf.84.1542016712631; Mon, 12 Nov 2018 01:58:32 -0800 (PST) Received: from [192.168.43.112] ([93.68.220.21]) by smtp.gmail.com with ESMTPSA id t129-v6sm12292695wmd.14.2018.11.12.01.58.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 01:58:32 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: Re: [PATCH 00/12] unify the interface of the proportional-share policy in blkio/io From: Paolo Valente In-Reply-To: <20181112095632.69114-1-paolo.valente@linaro.org> Date: Mon, 12 Nov 2018 10:58:29 +0100 Cc: linux-block , linux-kernel , Ulf Hansson , Linus Walleij , Mark Brown , 'Paolo Valente' via bfq-iosched , Oleksandr Natalenko , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, Jonathan Corbet , lennart@poettering.net Content-Transfer-Encoding: quoted-printable Message-Id: References: <20181112095632.69114-1-paolo.valente@linaro.org> To: Jens Axboe , Greg Kroah-Hartman , Tejun Heo , Li Zefan , Angelo Ruocco , Dennis Zhou , Josef Bacik , Liu Bo , Bart Van Assche , Johannes Weiner X-Mailer: Apple Mail (2.3445.100.39) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Forgot to CC Lennart, sorry. > Il giorno 12 nov 2018, alle ore 10:56, Paolo Valente = ha scritto: >=20 > Hi Jens, Tejun, all, > about nine months ago, we agreed on a solution for unifying the > interface of the proportional-share policy in blkio/io [1]. Angelo > and I finally completed it. Let me briefly recall the problem and the > solution. >=20 > The current implementation of cgroups doesn't allow two or more > entities, e.g., I/O schedulers, to share the same files. So, if CFQ > creates its files for the proportional-share policy, such as, e.g, > weight files for blkio/io groups, BFQ cannot attach somehow to them. > Thus, to enable people to set group weights with BFQ, I resorted to > making BFQ create its own version of these common files, by prepending > a bfq prefix. >=20 > 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]. >=20 > 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, > preceded by the name of the entity that produced that output. >=20 > With this solution, legacy code that, e.g., sets group weights, just > works, regardless of the I/O scheduler actually implementing > proportional share. >=20 > 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. >=20 > (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.) >=20 > Thanks, > Paolo >=20 > [1] https://lkml.org/lkml/2018/1/4/667 > [2] https://github.com/systemd/systemd/issues/7057 >=20 > Angelo Ruocco (7): > kernfs: add function to find kernfs_node without increasing ref > counter > 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 cfq > cgroup: make all functions of all cftypes be invoked > block, cfq: allow cgroup files to be shared > block, throttle: allow sharing cgroup statistic files >=20 > 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 >=20 > Documentation/block/bfq-iosched.txt | 31 +++-- > block/bfq-cgroup.c | 148 +++++++++++++------- > block/bfq-iosched.h | 4 +- > block/blk-cgroup.c | 22 +-- > block/blk-throttle.c | 24 ++-- > block/cfq-iosched.c | 105 +++++++++++---- > fs/kernfs/dir.c | 13 ++ > include/linux/blk-cgroup.h | 10 +- > include/linux/cgroup-defs.h | 14 +- > include/linux/cgroup.h | 13 ++ > include/linux/kernfs.h | 7 + > kernel/cgroup/cgroup.c | 262 = +++++++++++++++++++++++++++++------- > 12 files changed, 483 insertions(+), 170 deletions(-) >=20 > -- > 2.16.1