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 B8348C433F5 for ; Fri, 25 Mar 2022 12:50:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 228836B0071; Fri, 25 Mar 2022 08:50:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1D6D96B0073; Fri, 25 Mar 2022 08:50:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C74F6B0074; Fri, 25 Mar 2022 08:50:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id ED6F26B0071 for ; Fri, 25 Mar 2022 08:50:06 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9AB841828AE2C for ; Fri, 25 Mar 2022 12:50:06 +0000 (UTC) X-FDA: 79282891212.23.B439A9B Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf25.hostedemail.com (Postfix) with ESMTP id 234CDA003E for ; Fri, 25 Mar 2022 12:50:05 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id BD771210F1; Fri, 25 Mar 2022 12:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1648212604; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=A9k72q4nGxTZAjXFEZ3O4X+oiukJzFsmhEYIKREvjY4=; b=Orc9+Oa8vO07QT9vWpudH/xLJRCJV4ACZ1UzXBWsZ075CvmEEv9RklCIYYfU8tpcvGlSfs wQrd7Gr3sORgQ9cdVHZLTMTm7X/EehcTpc8lkeim5gbrdGP7E7qK/Aw61CuJ3rh48/eMjY lopuxx+qN2k8ovkkWyPfVAHjtYQMadg= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C50E3A3B82; Fri, 25 Mar 2022 12:50:02 +0000 (UTC) Date: Fri, 25 Mar 2022 13:49:59 +0100 From: Michal Hocko To: Zhaoyang Huang Cc: Chris Down , "zhaoyang.huang" , Andrew Morton , Johannes Weiner , Vladimir Davydov , ke wang , "open list:MEMORY MANAGEMENT" , LKML , cgroups@vger.kernel.org Subject: Re: [RFC PATCH] cgroup: introduce proportional protection on memcg Message-ID: References: <1648113743-32622-1-git-send-email-zhaoyang.huang@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: 3a6tq3dibq74dpysfgesw1kgriu5qx1t Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Orc9+Oa8; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf25.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 234CDA003E X-HE-Tag: 1648212605-304458 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: On Fri 25-03-22 11:08:00, Zhaoyang Huang wrote: > On Fri, Mar 25, 2022 at 11:02 AM Zhaoyang Huang wrote: > > > > On Thu, Mar 24, 2022 at 10:27 PM Chris Down wrote: > > > > > > I'm confused by the aims of this patch. We already have proportional reclaim > > > for memory.min and memory.low, and memory.high is already "proportional" by its > > > nature to drive memory back down behind the configured threshold. > > > > > > Could you please be more clear about what you're trying to achieve and in what > > > way the existing proportional reclaim mechanisms are insufficient for you? > > sorry for the bad formatting of previous reply, resend it in new format > > What I am trying to solve is that, the memcg's protection judgment[1] > is based on a set of fixed value on current design, while the real > scan and reclaim number[2] is based on the proportional min/low on the > real memory usage which you mentioned above. Fixed value setting has > some constraints as > 1. It is an experienced value based on observation, which could be inaccurate. > 2. working load is various from scenarios. > 3. fixed value from [1] could be against the dynamic cgroup_size in [2]. Could you elaborate some more about those points. I guess providing an example how you are using the new interface instead would be helpful. -- Michal Hocko SUSE Labs