Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5882266pxb; Thu, 27 Jan 2022 01:21:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIuzVhEa9oRGt88WMYziPIDcLrTprTkXDAEWb0aFPMWEE/8Oir2WU/Hb8v6mSemByMlfne X-Received: by 2002:a17:907:60d5:: with SMTP id hv21mr2286152ejc.476.1643275265335; Thu, 27 Jan 2022 01:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643275265; cv=none; d=google.com; s=arc-20160816; b=jUWdf5tikRTjhRwvwKTX5tE7sbzk0St+lcWXKqVrBtctvXGQl1bNR6lmGa0na0+Hav 48P+kaGBwrXTd7CNsVAV5C+JEXg/xotZ4yCLYg8s66OhNAMdjsTY4yVCGufCz3fzFXkx 8XCyy0wAxl23cr5rHtZZNxlx2t8/yKi6y1EPGvS0e+d6ALYJjCJda/qQQEK8GtV6rY3/ 6m7x7cg+sTD+/ufGUlA50WCGukUVCYLJNOaTCni9iM/XwZrgED91fCIiI/B1Zv+EptMK Q6qoR2SKL6iq8L8U2mf/MLXJidxoIyVTDepXmYCBRcrFLqbTqCmT9ebk5z5WXyVpSGKm H4Jw== 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=iWK4+VlzdKru0Gld3QWUsvg+MX/t8E08qICQUwClg9E=; b=ifhXjGwsuDNrl26+0wwBcvR//xDTmxD7+NNGInWbE60zidFAmMVvCz3mgKCq1MFGga K5gzP5eTMK9wYpkc70nVYF8Zfhj8V7NaWxIlN1EnWl2XMm0cYdsFSfkMRMPTvmT3Ms6c D/wOAHz3JKgXRTtrMgPAiP2IyTzQqj9x4drQOtJ3ghWJMpV3ym0OSbNxmoKIiVo3NozU 5mYJCT1F6dPpbALJf9ENoMFzDseUM7ff0gZtjEX1cL8xl09WdiLOEwEhRyYG7wGWdnWq GY1+DfITTPIokdzzj8zbdR+dDcK4450TimDgLekodMqK5dPw6ZRkUdV0uYUebQRBvkY2 /nRQ== 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=QUARANTINE sp=QUARANTINE 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 dt11si1214017ejc.774.2022.01.27.01.20.40; Thu, 27 Jan 2022 01:21:05 -0800 (PST) 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235217AbiA0Cgn (ORCPT + 99 others); Wed, 26 Jan 2022 21:36:43 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]:35875 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231508AbiA0Cgl (ORCPT ); Wed, 26 Jan 2022 21:36:41 -0500 Received: from kwepemi500025.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Jkl7n11TGzccmW; Thu, 27 Jan 2022 10:35:49 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by kwepemi500025.china.huawei.com (7.221.188.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 27 Jan 2022 10:36:39 +0800 Received: from [10.174.176.73] (10.174.176.73) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 27 Jan 2022 10:36:38 +0800 Subject: Re: [PATCH -next] blk-throttle: enable io throttle for root in cgroup v2 To: Tejun Heo CC: , , , , References: <20220114093000.3323470-1-yukuai3@huawei.com> From: "yukuai (C)" Message-ID: <235b0757-d322-2b6e-3ab6-ecc8c82f8f1e@huawei.com> Date: Thu, 27 Jan 2022 10:36: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="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.176.73] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2022/01/27 1:29, Tejun Heo ะด??: > On Fri, Jan 14, 2022 at 05:30:00PM +0800, Yu Kuai wrote: >> RFC patch: https://lkml.org/lkml/2021/9/9/1432 >> >> There is a proformance problem in our environment: >> >> A host can provide a remote device to difierent client. If one client is >> under high io pressure, other clients might be affected. >> >> Limit the overall iops/bps(io.max) from the client can fix the problem, >> however, config files do not exist in root cgroup currently, which makes >> it impossible. >> >> This patch enables io throttle for root cgroup: >> - enable "io.max" and "io.low" in root >> - don't skip root group in tg_iops_limit() and tg_bps_limit() >> - don't skip root group in tg_conf_updated() >> >> Signed-off-by: Yu Kuai > > Yeah, I'm kinda split. It's a simple change with some utility, but it's also > something which doesn't fit with the cgroup feature or interface. It's > regulating the whole system behavior. There's no reason for any of the > control "groups" to be involved here and semantically the interface would > fit a lot better under /proc, /sys or some other system-wide location. Here > are some points to consider: > > * As a comparison, it'd be rather absurd to enable memory.max at system root > in terms of interface and most likely break whole lot of mm operations. > > * Resource control knobs of a cgroup belong to the parent as the parent is > responsible for divvying up the available resources to its children. Here > too, the knobs are making sense because there's a higher level parent > (whether that's hypervisor or some network server). > > Is your use case VMs or network attached storage? > Hi, In our case, the disk is provided by server, and such disk can be shared by multipul clients. Thus for the client side, the server is a higher level parent. Theoretically, limit the io from server for each client is feasible, however, the main reason we don't want to do this is the following shortcoming: client can still send io to server unlimited, we can just limit the amount of io that can complete from server, which might cause too much pressure on the server side. Thanks, Kuai