Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2110130pxb; Fri, 25 Mar 2022 11:15:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiVe3I7qq49trZpJqr6f62HoSFzbpE77A6GqgiDSI0wLxKUJ6sTWPgavogb1h4WOJmhyy1 X-Received: by 2002:a17:90b:3b91:b0:1c7:b89f:4a4f with SMTP id pc17-20020a17090b3b9100b001c7b89f4a4fmr12064578pjb.215.1648232136561; Fri, 25 Mar 2022 11:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648232136; cv=none; d=google.com; s=arc-20160816; b=PU3ibEefy8ZzgYUvl6Jek9K3lbvhEwZYH9nb3TFiiGct8VBQCCkYOfUqLJN48Jrcb9 5O7Yy3zLQ1VGr3CpRNP9WxhIC94+ZW5yLApvBWpJxweb8xMEHqAzYWi4ZylCEX6uyDzz tPrIrz+p16+9p4i73K/CQbNMjemxDb+JLHB0reYhlUvOjwkAuvmjw0fB9j9UBs//rCIk I8Ea70rrGNob/EOmNPgAZyXBlHQQ59jMlraRllKZ6FmEufcJd4n6sYBRpYZx13zLEvFg 0E8pMexSZExcdN7RJ75bQlFAE3bdaxixDD08iyM4u/tuXtkZYGBYnQWQkxwTOfSpTkXP HgwA== 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:dkim-signature; bh=A9k72q4nGxTZAjXFEZ3O4X+oiukJzFsmhEYIKREvjY4=; b=fyNB7gf2r++i25+0iertfcS0S9pqylHBOI1erP2Ml05vgWmZR7bh1bFCfbjA6OWahi eCsdHuDE3KFY/fVbh/P2808KSZyKZR2fNufhcikrLhdL030Je8zgmAg8o3YruwjgOoI6 I39lVjlxrMsCrEwl2JNxdblv1JtPFEaVhEG7RXZmedAjpda9jMEzdmZJUyjz+9jVkpOS K13padti+R9HBZ1PEzRvW7C+yEVsWZm0/30OT2SQcuq4Kd8c3cDEdDjxXUx0IvACD4bQ kt0ozahGmcJbtF+cipCIvyXftKh9mHdPBOUy6TTFsS61UW4eVIB1bZQmhR5MLPTMaVdo rhow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Orc9+Oa8; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g4-20020a1709026b4400b00153b2d1664bsi2762216plt.595.2022.03.25.11.15.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:15:36 -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=@suse.com header.s=susede1 header.b=Orc9+Oa8; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2C8E511863B; Fri, 25 Mar 2022 10:44:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354872AbiCYMvm (ORCPT + 99 others); Fri, 25 Mar 2022 08:51:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242879AbiCYMvl (ORCPT ); Fri, 25 Mar 2022 08:51:41 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1F9865820; Fri, 25 Mar 2022 05:50:06 -0700 (PDT) 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-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 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