From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49606C433EF for ; Thu, 24 Mar 2022 16:23:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B0E106B0071; Thu, 24 Mar 2022 12:23:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ABC676B0073; Thu, 24 Mar 2022 12:23:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 984F86B0074; Thu, 24 Mar 2022 12:23:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 8609C6B0071 for ; Thu, 24 Mar 2022 12:23:50 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 47812180A4F1E for ; Thu, 24 Mar 2022 16:23:50 +0000 (UTC) X-FDA: 79279801020.31.8B57761 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf12.hostedemail.com (Postfix) with ESMTP id 40AE940047 for ; Thu, 24 Mar 2022 16:23:49 +0000 (UTC) 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-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: y9fimc44gixjkrb8f33i55m5fjk3h1ke Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="Dz+/nGu1"; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf12.hostedemail.com: domain of roman.gushchin@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev X-Rspamd-Queue-Id: 40AE940047 X-HE-Tag: 1648139029-714916 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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