Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4894793iob; Mon, 9 May 2022 04:18:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz137BQcgupmA/ZdhHBmUCVRNJqrN/fwKS2YLtBpu5x7eLrfOMsKRLS+7myBG8b+3DZIUZ+ X-Received: by 2002:a05:6a00:4197:b0:510:671d:709c with SMTP id ca23-20020a056a00419700b00510671d709cmr15298280pfb.61.1652095090948; Mon, 09 May 2022 04:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652095090; cv=none; d=google.com; s=arc-20160816; b=G20mHMgDf670vL0RBtnQypG3xxl+MeS1HaUKTpi4ppyDyLn3CgebZGUS31OPlMOaug aicxupVQvdCs97O+rGGhDVClaDult4Cv/NliU1UCkJF5E25GwX2V892kjJoMuHrlsPC4 EJRO1fKYeRb3/c12goFalyFQy05aDrGjr8SKR1LgfMP77d5C8WpN0Khwi5TESbJUh9Xs ZGk9lTknuTRda2aWvcUQw7crUxgTjhbgaj2l/dqHT7FUcR/Fj3H2Uap0PCV1Zp2Xg+Mu H8r74iZyNZsIn0vPGSHmkvPwxyVyOnWAh/DN6gJRtElOAct0dE9/Psahs20OTxgzExVw PQhA== 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=pXZ/Mip46MPK94udG6dn0vA9jCul4KfitQH0YKOCKlo=; b=Fsn+21FkMkaPw1fXoTjA0+4QMYMhFpaEHrMuupJ9SuyuD0ygrLbqxZmIDcOacuYvNg SqbcZo+mh3FrYqeMn2vaRiEBdxaqUQA3YJEyahPC0swqZa8jx6cBZ17u0IHsaRq1zjQk nOBzUpA4gAgMojX08bghnj5JXK8EIA5YyCrY0PpTpz+eaGn3JwE7SsXi9U40YKsEZM+F LULxx5pTo6DQlc+CyDgBvaXVJ+lhcZiPfbWs4cPS1qE6g7vPdVxxOBofU9q/50lsggD6 zhMJN2XjTy6i4Tytrtgfn/OujZ2oeqbu+y4zboToXj0JfMXae1T/PRlwoW6aL1616zGe Wlhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=VV80UgGU; 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 y70-20020a638a49000000b003ab019ed015si13885796pgd.533.2022.05.09.04.18.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 04:18:10 -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=VV80UgGU; 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 799D02A1FE9; Mon, 9 May 2022 03:28:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441825AbiEFNpp (ORCPT + 99 others); Fri, 6 May 2022 09:45:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1441886AbiEFNpg (ORCPT ); Fri, 6 May 2022 09:45:36 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA3A538DAB; Fri, 6 May 2022 06:41:53 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 5D55F1F91C; Fri, 6 May 2022 13:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1651844512; 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=pXZ/Mip46MPK94udG6dn0vA9jCul4KfitQH0YKOCKlo=; b=VV80UgGUua9ByI5dnKDgazpxk/aupgxGDKd9KoBkpD9krA/NR1XXVh6kgSKaZ7FUzsf8f0 zkBRcq08cNuw+WGzG+8vRnfHpT3IQstg+wTRO7clRbPhs6BBEHLo0KCBFeEKzSE5o9Tl3z hIkEaaxexMDzsfw5D/nqLKWqnK7j/Zw= 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 1D7312C142; Fri, 6 May 2022 13:41:51 +0000 (UTC) Date: Fri, 6 May 2022 15:41:50 +0200 From: Michal Hocko To: cgel.zte@gmail.com Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, willy@infradead.org, shy828301@gmail.com, roman.gushchin@linux.dev, shakeelb@google.com, linmiaohe@huawei.com, william.kucharski@oracle.com, peterx@redhat.com, hughd@google.com, vbabka@suse.cz, songmuchun@bytedance.com, surenb@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, Yang Yang Subject: Re: [PATCH] mm/memcg: support control THP behaviour in cgroup Message-ID: References: <20220505033814.103256-1-xu.xin16@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220505033814.103256-1-xu.xin16@zte.com.cn> 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 Thu 05-05-22 03:38:15, cgel.zte@gmail.com wrote: > From: Yang Yang > > Using THP may promote the performance of memory, but increase memory > footprint. Applications may use madvise to decrease footprint, but > not all applications support using madvise, and it takes much costs > to re-code all the applications. And we notice container becomes more > and more popular to manage a set of tasks. Could you be more specific about the actual usecase? When do you group processes based on their general THP reqirements? You are mentioning containers but those are usually bags of different processes that just share a common objective. > So add support for cgroup to control THP behaviour will provide much > convenience, administrator may only enable THP for important containers, > and disable it for other containers. Why would that be a matter of importance? Also what is actual semantic when processes living inside those cgroups explicitly state their THP requirements? -- Michal Hocko SUSE Labs