Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp114087pxb; Fri, 17 Sep 2021 20:43:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ1pY51gRh8C+lzpfKDF/G5Hkyzz5nEYBQO2QVHi4hhUbltPebnl5W0/7o1q3vvXHXDwQj X-Received: by 2002:a05:6402:2908:: with SMTP id ee8mr16494415edb.33.1631936626166; Fri, 17 Sep 2021 20:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631936626; cv=none; d=google.com; s=arc-20160816; b=kyxa01LS91oQau356jUQaexsnztf5IHhCYVCEBqN07q3K6saMKjrmxxvWQvRF6ZgzL vRAoblynpZbGv775MEku/XRmfxRGQXwqONz9MCzRnF4ssKPMbWATO/MeKrz9dsPG2YrU nbNifpwCgUVcdvHQ+gC/1JjBBeep6z05ZeYXrT2871JNBorNYJ1ld9SOlURiJE+5MOLt CPA9KYd8SDWvkxdRJLkNNXswDpjOoT1DfumcuxFChgxlbmqDR5YaR4UE+67xoT9Ys++N a/5o1Clc/Yvbb2QCKMC41xt2TcJP7y85V2OymdjQsdQLUguW1xKguuQfdNmhNbUq1tK9 1ZKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8z3zDqb9jHwewDsR6d6jFjnHJNDXqkGQ9qKSj/mtO3I=; b=qIManmsYi3FfDFPVjKzRmUT4nBzbzCXVnCATOWKDPUYpLII0vbd2aoLHlzRItKQKK+ jSrf4Jnj3l/c2jj5FvkMRA6zn1HCy42JnYq7FkBRLrRpbg4ARFpE/V7KNCLPYvlLz5iy UJmQuUzIiWKQpJ/lfrIBTqmnRNCI9r1rZLMgQsDi0RcrmJVNMQapQBzM/4hKEGKCAdJ1 1kH+nWkmYvNtzbB4ypS6FmJyj8uKTxJ1v47Ra7c6MqJiHmAP9TKuW8wDP1w9VERZscpL O4cCssyfbnN32+f1g1R50dd7dxdCjSiGCruAYh5Oe6xyAr+ZPFYd8A+cKBEkz+oawqeo er/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=p3i2eO9b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c24si8933502edn.26.2021.09.17.20.43.21; Fri, 17 Sep 2021 20:43:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=p3i2eO9b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234950AbhIQT7j (ORCPT + 99 others); Fri, 17 Sep 2021 15:59:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234785AbhIQT7i (ORCPT ); Fri, 17 Sep 2021 15:59:38 -0400 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC422C061574 for ; Fri, 17 Sep 2021 12:58:15 -0700 (PDT) Received: by mail-qv1-xf2a.google.com with SMTP id jo30so7190854qvb.3 for ; Fri, 17 Sep 2021 12:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8z3zDqb9jHwewDsR6d6jFjnHJNDXqkGQ9qKSj/mtO3I=; b=p3i2eO9bZioHssZ6kaL2EhcmSvQnkzqovV6gtYx5yBvZO8U8YgpWOlQ4NiPfFu4X/J kq42DVIAloR+3OGOhdrNAXTsMwGB1U7dJa3O879NkyHssAV9C272KFs31R+STdzezEk4 iOZgQfQWGyJRlmnpBjLIy+vbAbGLNiJBL5ugeXvgBB2jn2P24RbSi3TeTA5A0lwnn47s PwzdY3me6Ws7HWX0K/11ZDJyTAFXZiSXZab+/pD+cz4UkJGM1xapMnr2hW0LlT/rH1Z2 Pa2ny4IAV+bTWgisTZ1NVj/q+S69AWy3isi9fdKt0PhqH0B6B0mHZsYzenKs+68iYGK4 PjeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8z3zDqb9jHwewDsR6d6jFjnHJNDXqkGQ9qKSj/mtO3I=; b=oA1c8GXwCcniTE9mQcnRodwaTSd6Wge/3+HXol3hWQmljdK25DcvGGInTrifYE8MoV 7otYySZb9HgsNXbFbSdYAkJYnqyyQ3P+oQs0CYx8qNvltlKV8X3t3QHzKYj12ba5IWSJ HeMiNIpOArd7QADCldDRKtbU703USiiOtAKdzvyRjPF7ii5kNObgOtS4GLAfLWSQXejo R7JfjiOlTiO3PX5RClqHxX6x1PeWwjPae9E7PiabSEflA6aXgOAU5c+VlOclGk+uofyy nfI1uMMd1twi2NQh8tnP66RZNWjuuJ5f38A1ncZHLg+CkmzEjEAjrH9n3HoIcGIGtDqE cCcw== X-Gm-Message-State: AOAM530NWmElu3KKB8TaSrehrl8aojLkCjIbEUNOOyibRI9YD8TRP6x8 G2mD6y0n6utREGWrB3l8lk2KFiqr85tIB4AZkaTaOg== X-Received: by 2002:ad4:436b:: with SMTP id u11mr12932089qvt.26.1631908694821; Fri, 17 Sep 2021 12:58:14 -0700 (PDT) MIME-Version: 1.0 References: <20210909140815.2600858-1-yukuai3@huawei.com> <20210917174103.GC13346@blackbody.suse.cz> In-Reply-To: <20210917174103.GC13346@blackbody.suse.cz> From: Khazhy Kumykov Date: Fri, 17 Sep 2021 12:58:03 -0700 Message-ID: Subject: Re: [RFC PATCH] blk-throttle: enable io throttle for root in cgroup v2 To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Yu Kuai , tj@kernel.org, axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000017066805cc365a3b" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000017066805cc365a3b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2021 at 10:41 AM Michal Koutn=C3=BD wrot= e: > > Hello Yu. > > On Thu, Sep 09, 2021 at 10:08:15PM +0800, Yu Kuai wr= ote: > > I'm not sure why this feature is disabled in the first place, is > > there any problem or design constraint? > > The idea for v2 is that in the root cgroup remain only kernel threads tha= t > provide "global" services and any user workload that should be > constrained is put into non-root cgroups. Additionally, if kernel > threads carry out work associated with a cgroup they can charge it to > the respective cgroup. > > [snip] > > We want to limit the overall iops/bps of the device in cgroup v2, > > Cui bono? (I mean what is the reason for throttling on the global level > when there's no other entity utiliting the residual? > Your drives are too fast?) We'd be interested in something like this as well. (at least for io.max). Our use case is providing remote devices which are a shared resource. A "global" throttle like this (which is set by a local management daemon) allows for throttling before sending network traffic. It's also useful since we can put this throttle on a dm, so we can enforce an aggregate throttle without needing backchannels to coordinate multiple targets. (This does also bring up: if this is a useful thing, would it make sense to tie to the device, vs. requiring cgroup. We happen to use cgroups so that requirement doesn't affect us). Khazhy > > Michal --00000000000017066805cc365a3b Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPmAYJKoZIhvcNAQcCoIIPiTCCD4UCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggzyMIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0yOTAzMTgwMDAwMDBaMFQxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSowKAYDVQQDEyFHbG9iYWxTaWduIEF0bGFz IFIzIFNNSU1FIENBIDIwMjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvLe9xPU9W dpiHLAvX7kFnaFZPuJLey7LYaMO8P/xSngB9IN73mVc7YiLov12Fekdtn5kL8PjmDBEvTYmWsuQS 6VBo3vdlqqXZ0M9eMkjcKqijrmDRleudEoPDzTumwQ18VB/3I+vbN039HIaRQ5x+NHGiPHVfk6Rx c6KAbYceyeqqfuJEcq23vhTdium/Bf5hHqYUhuJwnBQ+dAUcFndUKMJrth6lHeoifkbw2bv81zxJ I9cvIy516+oUekqiSFGfzAqByv41OrgLV4fLGCDH3yRh1tj7EtV3l2TngqtrDLUs5R+sWIItPa/4 AJXB1Q3nGNl2tNjVpcSn0uJ7aFPbAgMBAAGjggGKMIIBhjAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0l BBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFHzM CmjXouseLHIb0c1dlW+N+/JjMB8GA1UdIwQYMBaAFI/wS3+oLkUkrk1Q+mOai97i3Ru8MHsGCCsG AQUFBwEBBG8wbTAuBggrBgEFBQcwAYY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