From patchwork Tue Jun 11 19:49:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 10988261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CEEF6C5 for ; Tue, 11 Jun 2019 19:50:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECDB528779 for ; Tue, 11 Jun 2019 19:50:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAF1B287A6; Tue, 11 Jun 2019 19:50:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0367628779 for ; Tue, 11 Jun 2019 19:50:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405521AbfFKTuD (ORCPT ); Tue, 11 Jun 2019 15:50:03 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:47046 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405039AbfFKTuD (ORCPT ); Tue, 11 Jun 2019 15:50:03 -0400 Received: by mail-pf1-f195.google.com with SMTP id 81so8069056pfy.13 for ; Tue, 11 Jun 2019 12:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lY+HFPXQjnhdVN6fSFWWZeZa7jthQVIc7XJczuJqp8Y=; b=d0uAZ2FBp3dWsYFMB4CpKCGSWfZS4QfDM+fw1chX0UYmhfT/YkBpN9AEJJDXsirrns NeTe4Ek7l7PvcWV3h6FWkgxEHmsNf0NaRSM6F3+gpA5JAlB6ZJNdtP0lXbj+pfvndlc1 M9nN9IHVToz1s66XS9tBVRPehTbj7CClzyfh3yF/OqEbh+BAweJbO65J1dTi8XfguTta 0wSI4DE+epp0SYuoEiyTJiq1ewnTZUZkZRlRrOstPPN1F1NfR/y8RJuTw0xdaNTInTrl 4UbB+CV9xB7aI+2rx//BXS9+1z8lGtB/a0TxwFAk1pt3v8PVYl/9H4h0PRmyDoFefrA/ 40kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=lY+HFPXQjnhdVN6fSFWWZeZa7jthQVIc7XJczuJqp8Y=; b=KKHQK4WgQSMc8SJbaPJ/+rwqU4ej3h1DUKSGZui0C16FzmNFpaUsXCVuRsEcnhI9o2 iQTVIK0p8AuJd2RQ88KTKe5ywsEufuMAzMw/ZlNSGgO23oMAc/UUE3z1giy/W/U5aF9A h9X/w9PjO4AQLWj3Fw1TIESa1BGKIfzh0tqO60VfO5nPtWOrMuGsnRCQHYF1Y/suJf1x nSOFM6BNKTJaWSug57fRwUulPV3MpAIw7juXiaR3a/Q7JLUKWkwWB5tT499nlW0bIefu whV3xK1kyiqLS7s3ChyDMrtJPOlXepCCS44RnsfDlG4FdD6ZH75DtGaIEY2yZ6OeW+Be bAOw== X-Gm-Message-State: APjAAAVTBnteuZaeX0IOR2Bw26KI7+CgraKzCcxQc4zMAMQJXVKUQdcv oPOo33wBNtdtjACj+YLuS5Q= X-Google-Smtp-Source: APXvYqyhFHkzCgOBVQojMqBQXQUpeBp3bNdkiIskuK8l1rHzNJlzhUUvMUor4aGRDqoyVP97UlLl4A== X-Received: by 2002:a17:90a:bc08:: with SMTP id w8mr29131755pjr.45.1560282602407; Tue, 11 Jun 2019 12:50:02 -0700 (PDT) Received: from localhost ([2620:10d:c091:500::2:1677]) by smtp.gmail.com with ESMTPSA id y133sm16053422pfb.28.2019.06.11.12.50.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 12:50:01 -0700 (PDT) Date: Tue, 11 Jun 2019 12:49:59 -0700 From: Tejun Heo To: Linus Torvalds Cc: Jens Axboe , Paolo Valente , Li Zefan , Johannes Weiner , "linux-block@vger.kernel.org" , Johannes Thumshirn , Ulf Hansson , Linus Walleij , Fam Zheng Subject: [PATCH block/for-5.2-fixes] bfq: use io.weight interface file instead of io.bfq.weight Message-ID: <20190611194959.GJ3341036@devbig004.ftw2.facebook.com> References: <4f801c9b-4ab6-9a11-536c-ff509df8aa56@kernel.dk> <52daccae-3228-13a1-c609-157ab7e30564@kernel.dk> <90A8C242-E45A-4D6E-8797-598893F86393@linaro.org> <20190610154820.GA3341036@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190610154820.GA3341036@devbig004.ftw2.facebook.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP (Description mostly stolen from 19e9da9e86c4 ("block, bfq: add weight symlink to the bfq.weight cgroup parameter") Many userspace tools and services use the proportional-share policy of the blkio/io cgroups controller. The CFQ I/O scheduler implemented this policy for the legacy block layer. To modify the weight of a group in case CFQ was in charge, the 'weight' parameter of the group must be modified. On the other hand, the BFQ I/O scheduler implements the same policy in blk-mq, but, with BFQ, the parameter to modify has a different name: bfq.weight (forced choice until legacy block was present, because two different policies cannot share a common parameter in cgroups). Due to CFQ legacy, most if not all userspace configurations still use the parameter 'weight', and for the moment do not seem likely to be changed. But, when CFQ went away with legacy block, such a parameter ceased to exist. 19e9da9e86c4 ("block, bfq: add weight symlink to the bfq.weight cgroup parameter") tried to solve the problem by creating a symlink but there doesn't seem to be a good reason for the added complexity. Make bfq simply create interface file io.weight instead of io.bfq.weight. Signed-off-by: Tejun Heo Cc: Jens Axboe Cc: Paolo Valente Cc: Angelo Ruocco --- block/bfq-cgroup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c index b3796a40a61a..c68c6aa22154 100644 --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -1045,8 +1045,8 @@ struct blkcg_policy blkcg_policy_bfq = { struct cftype bfq_blkcg_legacy_files[] = { { - .name = "bfq.weight", - .flags = CFTYPE_NOT_ON_ROOT, + .name = "io.weight", + .flags = CFTYPE_NOT_ON_ROOT | CFTYPE_NO_PREFIX, .seq_show = bfq_io_show_weight, .write_u64 = bfq_io_set_weight_legacy, }, @@ -1165,8 +1165,8 @@ struct cftype bfq_blkcg_legacy_files[] = { struct cftype bfq_blkg_files[] = { { - .name = "bfq.weight", - .flags = CFTYPE_NOT_ON_ROOT, + .name = "io.weight", + .flags = CFTYPE_NOT_ON_ROOT | CFTYPE_NO_PREFIX, .seq_show = bfq_io_show_weight, .write = bfq_io_set_weight, },