Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1093278pxb; Sun, 19 Sep 2021 06:02:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEprk3Td/lWRK0C/c2iW1wVGgvYFf+iegOM8U3NEzrLccxg8fl7GnstRWH0p6dJpt8d95c X-Received: by 2002:a05:6638:1444:: with SMTP id l4mr15728390jad.41.1632056532179; Sun, 19 Sep 2021 06:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632056532; cv=none; d=google.com; s=arc-20160816; b=JurHGXYXOhnU4OFBhhtdAzRABbLISJRkoWGSiOgP4i7QtfFE3Hfo46e2Puqz9/NeqK TEH4xzI9UNZHsT0YJLjvddlQLqibk0+woqaQhyDo3shV+xd7bcUwlyWpMJ3LdD1CTBQ7 zcpt4xsasnRDrWOSC9fppLU9dnqcB6hyZqJEVHd0X93zHs2asf+qC0pLFWnMtENQ6tRa Q7hGGnZUplYasEuKAtk1lyXLaXqLplgQmKrVM6Vq3OMt7VybisORfXlj68L5WKTtU3G4 st8/jFb88RqYrIkJkIzHka3CokmHKfyM86dqWJ5LxzsWhQJSfk04UIllMRl9dmGb8SGb E1PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=EeGlFfvVFF/w5d/T7jpRbseCym8xrizX2FwEeIckIWw=; b=hSEPPfKXfr7CSPEa1W7DPZNl9kSGtPEJmnFvdBLeClRbvXq9hytniQQi5SfOO1bFJq /xCt709X+71n2YHL80lUaHK8vgXaekuGp5eyzJJfhCYbhRgY/Rs6PU/XpeoWc+3cEgKX cZMhO58hnQQVwOvq0kCaxtaYWLem7pBincFa3k+QS53/hGHopevwtlj1tWob2brm+VRD WL/FVxMictF54HcWKFdfIA52e9iUVdUyg+UTHxf8i8LfXRtc4aeVN1TCU/+c6MPtr6Wv eLIaiYiWfnfb9shL78GS6h8GX4t55UTD36rFpes4CKu95z4X1CQyR6jSVb5xEeI6Zg3n famA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si8717245ilx.124.2021.09.19.06.02.00; Sun, 19 Sep 2021 06:02:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbhISKdJ (ORCPT + 99 others); Sun, 19 Sep 2021 06:33:09 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:9895 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbhISKdI (ORCPT ); Sun, 19 Sep 2021 06:33:08 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HC3ld73fSz8yRT; Sun, 19 Sep 2021 18:27:09 +0800 (CST) Received: from dggema762-chm.china.huawei.com (10.1.198.204) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.8; Sun, 19 Sep 2021 18:31:39 +0800 Received: from [10.174.176.73] (10.174.176.73) by dggema762-chm.china.huawei.com (10.1.198.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Sun, 19 Sep 2021 18:31:39 +0800 Subject: Re: [RFC PATCH] blk-throttle: enable io throttle for root in cgroup v2 To: Khazhy Kumykov , =?UTF-8?Q?Michal_Koutn=c3=bd?= CC: , , , , , References: <20210909140815.2600858-1-yukuai3@huawei.com> <20210917174103.GC13346@blackbody.suse.cz> From: "yukuai (C)" Message-ID: <37f8c687-8549-104a-2501-532a0cfc9a48@huawei.com> Date: Sun, 19 Sep 2021 18:31:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.176.73] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggema762-chm.china.huawei.com (10.1.198.204) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/09/18 3:58, Khazhy Kumykov wrote: > On Fri, Sep 17, 2021 at 10:41 AM Michal Koutný wrote: >> >> Hello Yu. >> >> On Thu, Sep 09, 2021 at 10:08:15PM +0800, Yu Kuai wrote: >>> 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 that >> 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 Our use case is similair to this, a host can provide several remote devices to difierent client. If one client is under high io pressure, other client might be affected. Thus we want to limit the overall iops/bps from the client. Thanks, Kuai > 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