Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp772370pxb; Tue, 5 Apr 2022 22:41:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKfvzxLDrDUgm4scOHY3d+q5SMpP3tGGqMywBcRppV++pRv/8hWSZ4Zt7LLcLY54DU+0Lo X-Received: by 2002:a17:902:ec8c:b0:154:2e86:dd51 with SMTP id x12-20020a170902ec8c00b001542e86dd51mr6955218plg.99.1649223675365; Tue, 05 Apr 2022 22:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649223675; cv=none; d=google.com; s=arc-20160816; b=TowdzFgOlN0G93oXr0eLdnk2/sade/RMsJOZIR9MXhIMMmmCI1B43QdGrQ5357kNkQ xWgrP4OCS4h1/JfH+hqs0GOC5YATtgqCCCM1TBa9tK9KtUsEjuGgRosWsxSlPMjyyNap XvIqxzCaSUXQIp93/RLhBFyiofi+p2X1Xaln7wQQ7wUcXlcqvmZUrCdkf86iWe9MMl70 Ntp6blFdNgPZSubogqgHe3o8evsLVdgwOpw094Pw7cWu+gLIYYGCmclLnbRTTE2C0Z/L AJDgz4O0T1u//h20YytQ6l2yGHSzW6IZnWUgywQgi9atUxbK5/6twanbKeFJkNCAFUNK /hdw== 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=VYOi21VBdrnEfgCIXqKolf+TBqlw4Pd+D8zmojzTZKg=; b=Y6eq+zmHL4AGH4Chtg701LxuNBLSITPxSVJVY/d/xee4ypyjjSyqk1+ko92M3rE64J E7Ip/mluvg1SScXDKym0Z17UPT+sU/oKVCXZBoDamcX/4cxLvM+RGTjcRoROvLjRQl+w NrOUhRFNPOqxQLaZRRuUd+vIPg/+s1/Fjw7+cPdvsyRWAsUs98XmT1q2b7OEVcIIJ9ob jCXSlpmlE/oFMwZXbCwUC4rk1wYYpoYUJvUbvZy+PfoMje/Tsa6IHYzExhPIxIfV82yC jYCUvlsvHbHcIJlVn/Qt68ivKsn1mpePvF4kIMB5D5OqV2WW+BmUu+gSeLrBwnK8R7/w E0Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=IzlVwj1U; 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 a24-20020a17090abe1800b001c6d662f572si3729237pjs.55.2022.04.05.22.41.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 22:41:15 -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=IzlVwj1U; 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 62AB8425426; Tue, 5 Apr 2022 21:46:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243481AbiDEVIA (ORCPT + 99 others); Tue, 5 Apr 2022 17:08:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352628AbiDENHD (ORCPT ); Tue, 5 Apr 2022 09:07:03 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B1E48300A; Tue, 5 Apr 2022 05:08:24 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 34FB4210EF; Tue, 5 Apr 2022 12:08:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1649160503; 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=VYOi21VBdrnEfgCIXqKolf+TBqlw4Pd+D8zmojzTZKg=; b=IzlVwj1UBmMOQmHd3Zp7EfAXZmHByCFtW1hb2ofyTRxldgM0qGnGQd6hQt8jCSab/6KcQa DvpaN+BbZ0cPKEbNjPfbufOi006FMFq43iNjeXx+OsbgAgJLj9TyIVm1NfWnLhJysJp1ob x43XW5Auch1IHBKqWUSgRQ4Q6Do+kNI= 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 81C8CA3B89; Tue, 5 Apr 2022 12:08:22 +0000 (UTC) Date: Tue, 5 Apr 2022 14:08:21 +0200 From: Michal Hocko To: Zhaoyang Huang Cc: Suren Baghdasaryan , "zhaoyang.huang" , Andrew Morton , Johannes Weiner , Vladimir Davydov , "open list:MEMORY MANAGEMENT" , LKML , cgroups mailinglist , Ke Wang Subject: Re: [RFC PATCH] cgroup: introduce dynamic protection for memcg Message-ID: References: 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 Mon 04-04-22 21:14:40, Zhaoyang Huang wrote: [...] > Please be noticed that this patch DOES protect the memcg when external > pressure is 1GB as fixed low does. This is getting more and more confusing (at least to me). Could you describe the behavior of the reclaim for the following setups/situations? a) mostly reclaiming a clean page cache - via kswapd b) same as above but the direct reclaim is necessary but very lightweight c) direct reclaim makes fwd progress but not enough to satisfy the allocation request (so the reclaim has to be retried) d) direct reclaim not making progress and low limit protection is ignored. Say we have several memcgs and only some have low memory protection configured. What is the user observable state of the protected group and when and how much the protection can be updated? I think it would be also helpful to describe the high level semantic of this feature. > Besides, how does the admin decide > the exact number of low/min if it expand from small to even xGB in a > quick changing scenario? This is not really related, is it? There are different ways to tune for the protection. [...] -- Michal Hocko SUSE Labs