Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2141572pxb; Fri, 25 Mar 2022 11:49:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5WNoxWRUscz8SDlhryxr4E6nNfVbYBxGsZ/Tqa3ly0mdvuIsMtThO1Ln+rfzoE/J5Nt9t X-Received: by 2002:aa7:81c6:0:b0:4fa:70a2:2063 with SMTP id c6-20020aa781c6000000b004fa70a22063mr11351926pfn.71.1648234197766; Fri, 25 Mar 2022 11:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648234197; cv=none; d=google.com; s=arc-20160816; b=Z/srY7iDGm11+F8VmSZZxOdw4XukYjl49EiIJTsg9n0cFWw1RsJlpPsss8kMx3O6hq Z2nRWhl+jqvwKy+z3PB28ZzoOV94FecrISwZ13N9mgk0KDggX5OQ000TYFRwm01QxYsZ QtN6Yo5/HZ4CUf7+USip0Igtaej5ZFHXbzIOXaGrrA/gcvz7XktDcUf8TScguScJqeLj SXvm57lgc0FFMViNBdEI5/msj6FLNJtm/LajiB2/upIrVYvh+LxsDAVhVx6QseWzLGFI v885jojXTWIz/0NYJ9gUiKmvxEpZQb45ZBlfqMKT9ta1nndkJM2VK6JngLs33801Irbx Yciw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=rZkrO50N8MIM5fdKHsVpbm2U8iuVkvk0CAUhdGmqqWM=; b=Ya7YpfP47v7r1r4dgmycX9pYDjn6b5iiL6GjUZk4MwKuZFkMrC+K66y3Ocu1nPkML3 Iq27+BLoxNdrbW50yh3O2qC7IRhSaBOPulnf6+sOsPLMBfZcvPhPiSMSRPP803aLJ/3W yyx7nTCDUo+j9LtuItk6UhJYRHUfGsejZMCIJQFVopIyrbz0aCg1xAjXq3M8vBawXTNW BrnWuNrg8B34oDYef11zz6sFSkZICfOqLedWI6fZZQ0mYP9x4AqijkBAILmhNpQ4pn1X qLlMwj4tyLnDVIjtj2Pf5NJqS9D2591cEedizqemgbMGOFiUTxcXjKJm99bewl3E2M+k 93WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LEzCQ1BW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j125-20020a636e83000000b003816043f165si3096408pgc.858.2022.03.25.11.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:49:57 -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=@gmail.com header.s=20210112 header.b=LEzCQ1BW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4C0D21402A; Fri, 25 Mar 2022 11:02:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358163AbiCYDMX (ORCPT + 99 others); Thu, 24 Mar 2022 23:12:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234794AbiCYDMU (ORCPT ); Thu, 24 Mar 2022 23:12:20 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5E729157F; Thu, 24 Mar 2022 20:10:47 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id i4so5553358qti.7; Thu, 24 Mar 2022 20:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=rZkrO50N8MIM5fdKHsVpbm2U8iuVkvk0CAUhdGmqqWM=; b=LEzCQ1BWpC5mhJuQigVniD6FG8W+FawIPFRfZn+Kc8wgPtrkzAdxNxjdF2z4sGF77R vx2tdr04eu9K+qltad/QTWCS+aJIjicWUybB4qRGdUGf2MFLsUJ26Wt2s/Yd3g/69drO nfmJa7B2HNNRWw5dUCx6PEQbxGEKpJEBmTZ+oYi4Mk4h7XqPLyFV36M4lrktps1MDGIM 7416CjhidMppBvW1QZARuGBCy9CPxN2gcZDERMFLwvRVPuByqnQ60bhEsGDqoBoYMpzf oYJTqoXCa3jnCaLnvzBLSEQ3zz+UytX3asngvJyWKFknxSwXSATB4MWAIynVxZeEhPvl u90Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=rZkrO50N8MIM5fdKHsVpbm2U8iuVkvk0CAUhdGmqqWM=; b=HMZk6yKo7SfaW+hNOuxX3fnQZ/WAaoY2yfANRWNi77vZGW/jKdwKQodGT7ThuA94uv aGQZAv01cNGv3q1vUdYCeE3P2gb4tkOyzH02pOIJr+6im5xcmmGSghGmlbbKOc1X7nxF uJhIZMTnrmV6nsy16nS1BcjsxPIdz6pO1usAkogs7XDXJbgFmGW2nBCNmgOBxVLvXel/ QDJHXNa+Ba3pYINA4lMnRfHeqb6OtnqVEIRJ7hxI7qQYr07GUdIGYFGBxnOFBW17Xm3g GUITl8s97jvqySKeZKcRHpzar9LgvTPlh42JnA/hETlZqfLKhkCKcqhxs9lQFMcyfShI kPjw== X-Gm-Message-State: AOAM5310hRbeE4d+vEXTYtvCaEwt6o/+GGElVBjPCF5eg9RaDt+kzZbW ySalkya2SNJ+0mkWYn6sWNoLFgoaQSMA2p4KpiU= X-Received: by 2002:ac8:4e50:0:b0:2e2:17a8:2ab0 with SMTP id e16-20020ac84e50000000b002e217a82ab0mr7367671qtw.68.1648177847048; Thu, 24 Mar 2022 20:10:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Zhaoyang Huang Date: Fri, 25 Mar 2022 11:10:19 +0800 Message-ID: Subject: Re: [RFC PATCH] cgroup: introduce proportional protection on memcg To: Roman Gushchin Cc: Chris Down , "zhaoyang.huang" , Andrew Morton , Johannes Weiner , Michal Hocko , Vladimir Davydov , ke wang , "open list:MEMORY MANAGEMENT" , LKML , cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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, Mar 25, 2022 at 12:23 AM Roman Gushchin wrote: > > It seems like what=E2=80=99s being proposed is an ability to express the = protection 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= than 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 workl= oad is simply leaking memory and growing indefinitely, protecting it seems = like a bad idea. And the first part can be easily achieved using an userspa= ce tool. > > Thanks! > > > On Mar 24, 2022, at 7:33 AM, Chris Down wrote: > > > > =EF=BB=BFI'm confused by the aims of this patch. We already have propor= tional reclaim for memory.min and memory.low, and memory.high is already "p= roportional" 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 f= or you? ok, I think it could be fixable for memory leak issues. Please refer to my reply on Chris's comment for more explanation.