Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4883578iob; Mon, 9 May 2022 04:03:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcAzgSpFQE5+zhXtc1KlfYnMhjW3RGrSGPne267/EedJ9Jy+aIeBYS0za3gSo+CmkVPjm8 X-Received: by 2002:a17:902:b94b:b0:15e:f33b:ec22 with SMTP id h11-20020a170902b94b00b0015ef33bec22mr13353365pls.119.1652094181374; Mon, 09 May 2022 04:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652094181; cv=none; d=google.com; s=arc-20160816; b=AvzGi9mZm6bzZDMTX/46pZwdic1E1CWEwuHT2Rrh9oBznc7GtZ8UEYlTQ/55ITjuNb /T/CjOQHE9FDcVkIX9iOEtwbUrZRy9SnGejk3CjWPWsKRUPaoub+OdLiXk0T85+FtVTJ RhGhQqlhXpNtLxmcR/vRqoHVxSVcn71JpyH9jbWYNH0lMfcvBr1AsrsOYi34A0M9VViM cqJnG7PtYTbv89lFCRaJl0LabrRqs58oN6FwhmgQMxAPvfE6KdU2mDQhQzssCsuMdM/1 d04Fk0vOp4SIF6ZpNyqHKb1m8iHntYBaei980vdajYF+Z1oXwemcDdYtYEiIi8uWqEiI cKNw== 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=EnVbGbF3CiTcycSBZO/loerdaCBwAlV6olMPMO9R0Qs=; b=PErXpdvbqzibAx24RsXjz/+NR9OwIHHMlvAQP6I+gWtdFkJiLodq9ESKIyAIgz+x8P sgr/Zy/nCk0pyB9b7PzCEVUWrPbPzUUqfApPFFH5NDpcV3IPFQh16XyLtUIc9XwsoFKd sTl6Kp9Q9uFeMj0ibsSCsHBUHm7Br1uePjIZ1ikaNYwvxZ2IIc5YtQ/lxEVXQjXNOxxs mfk1YL5Gya3WQp+/nYnuGfY0qGr1MXbyURvqFIgGeUE5zCcZ00fRZKdKFA0YXpwGnG1d jmwaLNgglXINuCr2InYnq5my9l8tmg5JMqfuZi5u+kPzDK2v2UCJ0IFg4lNhkFoGJ6XQ 8zbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=crXHB0LG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id na5-20020a17090b4c0500b001dc87243f72si12821862pjb.83.2022.05.09.04.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 04:03:01 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=crXHB0LG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 6B8EB19C740; Mon, 9 May 2022 03:17:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232978AbiEIKUv (ORCPT + 99 others); Mon, 9 May 2022 06:20:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233162AbiEIKUj (ORCPT ); Mon, 9 May 2022 06:20:39 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 573FADF2B; Mon, 9 May 2022 03:16:37 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id B098321C1C; Mon, 9 May 2022 10:00:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1652090433; 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=EnVbGbF3CiTcycSBZO/loerdaCBwAlV6olMPMO9R0Qs=; b=crXHB0LGP0sk30wzd0kWaM5SpjARbCCh70lfRoTsVFXEIuaZcoMvyMb1tID3C62z31gqYe yQ7D8QfaK+pJpNbEPL+K5d78N02gEkqfCsXBVAgUwGGbsSMibVYHliBh+Lr3X45ftFpA+w keJFS3J/goZuc+Z0vjcFJEU3EQEGDXE= 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 0B1902C141; Mon, 9 May 2022 10:00:31 +0000 (UTC) Date: Mon, 9 May 2022 12:00:28 +0200 From: Michal Hocko To: CGEL 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> <6275d3e7.1c69fb81.1d62.4504@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6275d3e7.1c69fb81.1d62.4504@mx.google.com> 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 Sat 07-05-22 02:05:25, CGEL wrote: [...] > If there are many containers to run on one host, and some of them have high > performance requirements, administrator could turn on thp for them: > # docker run -it --thp-enabled=always > Then all the processes in those containers will always use thp. > While other containers turn off thp by: > # docker run -it --thp-enabled=never I do not know. The THP config space is already too confusing and complex and this just adds on top. E.g. is the behavior of the knob hierarchical? What is the policy if parent memcg says madivise while child says always? How does the per-application configuration aligns with all that (e.g. memcg policy madivise but application says never via prctl while still uses some madvised - e.g. via library). > By doing this we could promote important containers's performance with less > footprint of thp. Do we really want to provide something like THP based QoS? To me it sounds like a bad idea and if the justification is "it might be useful" then I would say no. So you really need to come with a very good usecase to promote this further. -- Michal Hocko SUSE Labs