Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2194706pxb; Fri, 25 Mar 2022 12:48:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA6rjQ0p7Tgp7Mvcn4gnUSML9Obmz3X4H3oXN8AslBIW2cc8sucOUW57Wwx02q38enY/J0 X-Received: by 2002:a17:902:e9d3:b0:154:6dd6:2533 with SMTP id 19-20020a170902e9d300b001546dd62533mr13338274plk.31.1648237698796; Fri, 25 Mar 2022 12:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648237698; cv=none; d=google.com; s=arc-20160816; b=pkCdFtE2Ua/1wu/Z+7Kgl6PYv2H5US+tmv0LE3twCnaBkZ0L1GeFjwAaFOurcD+3Jc O2Jw7YnkJGPD151ybKZPL7Df689DExxPUL19AAYu6kTLL1wK/auntOZgQ0kH+s0h2xPo gdBaLwouqwqS+jhn7Z//9fjD3bgbW+NUM5wDEYVCE/yKVYoi3gbn53ZbPEa7OWNi5fwM p1f0W24db7YEiUbuDW8Ep2db7OVmYGgRp5ILLKBf1J7i/1ZAUZRNr5v6P2S7KYi/zYdV FNfby/6eT0/Bn/TqhYAlY3y3F1XYCbtDQbojj0PDFBP+aoDza4s9BdeVKSc/S5lKqM8B m0lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id:cc:date:in-reply-to :from:subject:mime-version:content-transfer-encoding:dkim-signature; bh=jlU6JpVYC93QtZ6D2/Ze8QjTZ71IF09IQ/nMKJqg8hc=; b=x03Va38NKOBxXRNA1RjuWTZwdMrwsW7TTDnwZDPXFekC2B5frygzaX7VJidTKIYzAx 9quNBcYGS1I0yeC1Ey8WdG5MmyBqSqhFWDGIQZLh0eJUnXLUxTNCfVSrqp9CIDFPs9qd 3bhCs22LmaVMiwSg1dbiAM2e7adpet1NKz48yuyv6tC49aydCQKMkyP1k3gJCYrArJBW udornlLgGHkPpW4ULJNqHcZBF5U22mycT9m3DUhIuudIco1rgEmxf4F3kmTsowBLHqub mgHo9SO3yXUnseGDXfaWWWeet733VV4vr292HNiNDJYQuiZykWT3NcLpKTYl8h2ceU+O dE2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="Dz+/nGu1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x19-20020a056a00189300b004fa3a8e0081si4531834pfh.312.2022.03.25.12.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:48:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="Dz+/nGu1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 24A10190B76; Fri, 25 Mar 2022 11:38:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351661AbiCXQZb (ORCPT + 99 others); Thu, 24 Mar 2022 12:25:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351651AbiCXQZW (ORCPT ); Thu, 24 Mar 2022 12:25:22 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 483E03D4A8; Thu, 24 Mar 2022 09:23:49 -0700 (PDT) Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1648139027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jlU6JpVYC93QtZ6D2/Ze8QjTZ71IF09IQ/nMKJqg8hc=; b=Dz+/nGu1/jm2+vB4zQIBb+nXE2hZlNTrO17gf+Lf9ZPWIfmxoX4vihNvVMbGxXdtPDE4E7 lYaSsRYI4FwNYMrnKL0Q9AnJhmAisTnqXmAn/ACjniKDXU20eF4DP71R5eHHuWmzE924jp 4njvGX3E9hG2vnT2mEOR5vDAcrZBfhU= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [RFC PATCH] cgroup: introduce proportional protection on memcg X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin In-Reply-To: Date: Thu, 24 Mar 2022 09:23:44 -0700 Cc: "zhaoyang.huang" , Andrew Morton , Johannes Weiner , Michal Hocko , Vladimir Davydov , ke wang , Zhaoyang Huang , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Message-Id: References: To: Chris Down X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It seems like what=E2=80=99s being proposed is an ability to express the pro= tection in % of the current usage rather than an absolute number. It=E2=80=99s an equivalent for something like a memory (reclaim) priority: e= .g. a cgroup with 80% protection is _always_ reclaimed less aggressively tha= n one with a 20% protection. That said, I=E2=80=99m not a fan of this idea. It might make sense in some reasonable range of usages, but if your workload= is simply leaking memory and growing indefinitely, protecting it seems like= a bad idea. And the first part can be easily achieved using an userspace to= ol. Thanks! > On Mar 24, 2022, at 7:33 AM, Chris Down wrote: >=20 > =EF=BB=BFI'm confused by the aims of this patch. We already have proportio= nal reclaim for memory.min and memory.low, and memory.high is already "propo= rtional" by its nature to drive memory back down behind the configured thres= hold. >=20 > Could you please be more clear about what you're trying to achieve and in w= hat way the existing proportional reclaim mechanisms are insufficient for yo= u? >=20