Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5534304pxb; Wed, 26 Jan 2022 14:22:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHHMXXGSuj9ibihWq8W7JEir4htmN+HmewidNpIk4YYp/rii5cGWKE4RdpKT0ycah4XISJ X-Received: by 2002:a17:906:d553:: with SMTP id cr19mr673448ejc.580.1643235736328; Wed, 26 Jan 2022 14:22:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643235736; cv=none; d=google.com; s=arc-20160816; b=JwrD97sXjJ+dNkFmtECGbvmZnpEizeF/FGwtwBtdZGV19Pmc/V/uUg99tTofbcsr61 rAcWvZmBBB4Ius9IdDt4cfXF+ALQfj0cZ3Zb1SujZfq+R1mwix6uhkWsbt/h4rGQB4ol 8Kwm5bV5EDGcnpyo3nWnBH7s47Qrzy6Mxe/UpIMeHDllo2qUtyu3ynyuiRr4hRKEdNuh muyJ9NGCm2vSZ7xrhllN/d3vwdrRjIQI+E5awXXZgUgJtnEKyk+2Zosm1KgIdThkCch9 6V5wQ5M4LfGX1o+AReP7RSECESCbMxERNg+DGQbB4WB5IeXo55sqaqJ4ZgDkJHK4f1/z UjMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=o7yVQ6gsvTTab9fYp8q+lCU+rLwohNUxOjiCLgJGdGM=; b=OXnuyV0ILU5jIq1tOAGXId20ZJOpdeUpc/H6aUbyj3ksYO7ZhT07djZEpDzWPKQ5OU MyUC+jqF6Jtl9glrPHhSDMX0tHubcu9pkwNhe/APVUS8oJo2FPWwyic6esXg6QV5XQek WWBqtHsjSHEl1/qWlS1FRxBy4CZ7fnxmGFVaJ1PhFqA5q5LgpgFkHAtr6gbplr6XMa4b fT60odQi4GSqYqs30vEd79unOdyQyMzkAq0FODLqx0XW+T2UAgUfpXJvyQ++BNq+1QLJ /fHH1+WJLiEos2sE6oDzoy6dm7sunnv0ZoD4CSNu0r5EGr7oXLdRI6MWjUWkv7Uvdllv LxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=O6zfBzmd; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp20si301970ejc.526.2022.01.26.14.21.51; Wed, 26 Jan 2022 14:22:16 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=O6zfBzmd; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243716AbiAZR33 (ORCPT + 99 others); Wed, 26 Jan 2022 12:29:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236899AbiAZR31 (ORCPT ); Wed, 26 Jan 2022 12:29:27 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE90C06161C; Wed, 26 Jan 2022 09:29:27 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id d15-20020a17090a110f00b001b4e7d27474so335196pja.2; Wed, 26 Jan 2022 09:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=o7yVQ6gsvTTab9fYp8q+lCU+rLwohNUxOjiCLgJGdGM=; b=O6zfBzmd+BywBFqXzIfiy3ycqMOwjnMfDYKV8Xlu61A5NUaAdxjhLjXRk91Zxmp379 0Zfjblp8ROfH7rGfRhEtsP/JWG6yw+G/qBGkEN722dXIW53FMFuWEu01agN9bdHb9we0 XOfCUvJMOBV/VWzq7SmjsTPdvjJ7m8E7DPaqPCR2KdqEhdKUcN20ZgDnwHGrUrZ6+I3h 8R/tO/SPoduJvlIslRZbhDKzQDuMNWYkbGxVq/ggvEDK6IeFnDzjVzrDuCHhUptS6yE3 zTZNooS0kFSqw6KKe8jJQpHWqMqYs1PMrHkCKAl3tpRiDJB4Eimn0LqYUPgEWvGJZSkJ kK4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=o7yVQ6gsvTTab9fYp8q+lCU+rLwohNUxOjiCLgJGdGM=; b=l2cEOGO1p2/3I7N4HQz0BC9A0nojRP7a/1rdpe1Hx1e2CjpOr8TGNa0HLg6xByehIM sG15LnT3sLLOideTEXk0rx8m5JS8uTT+XXy43uzLaE6azSMH2/IedWJthyDgGlCvHvNm yD9dV/B07Q16NcSz4fTllrqn4KQ5f0fhQFxXV7gQpUJq9Fi8OPB33CMeXnjy4KVTVVUb zVKvopY+PWUj0yxLotUJgodtB9dDGs5vbKG5PQ1RFkAIicx5asFwo9Erv0c7t/Kpgs9v KEnHS640zBcZXmoyuJ1t7zWaMk7GEyIWapf8p/eZRFrsLlOYXiKOxkjPOetnOqzKr+QD /C2Q== X-Gm-Message-State: AOAM532k/FQrp4pi9uHL10HPwqMUuUWrsqUnvggE/14umfFIAAdCklF8 FcOpQUs4uICAqK9VNr/qJoEjouEWLRZ3mw== X-Received: by 2002:a17:903:1212:: with SMTP id l18mr10132plh.45.1643218166669; Wed, 26 Jan 2022 09:29:26 -0800 (PST) Received: from localhost (2603-800c-1a02-1bae-e24f-43ff-fee6-449f.res6.spectrum.com. [2603:800c:1a02:1bae:e24f:43ff:fee6:449f]) by smtp.gmail.com with ESMTPSA id h18sm2699799pfv.216.2022.01.26.09.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 09:29:26 -0800 (PST) Sender: Tejun Heo Date: Wed, 26 Jan 2022 07:29:24 -1000 From: Tejun Heo To: Yu Kuai Cc: axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com Subject: Re: [PATCH -next] blk-throttle: enable io throttle for root in cgroup v2 Message-ID: References: <20220114093000.3323470-1-yukuai3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220114093000.3323470-1-yukuai3@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks. -- tejun