From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65350C433F5 for ; Wed, 18 May 2022 08:14:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C70296B0093; Wed, 18 May 2022 04:14:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF8956B0095; Wed, 18 May 2022 04:14:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A99758D0002; Wed, 18 May 2022 04:14:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 952836B0093 for ; Wed, 18 May 2022 04:14:51 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 625A2314DA for ; Wed, 18 May 2022 08:14:51 +0000 (UTC) X-FDA: 79478152782.23.7D60932 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf14.hostedemail.com (Postfix) with ESMTP id 59BE31000CD for ; Wed, 18 May 2022 08:14:48 +0000 (UTC) Received: by mail-pj1-f45.google.com with SMTP id nr2-20020a17090b240200b001df2b1bfc40so4889986pjb.5 for ; Wed, 18 May 2022 01:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WoEf2mJXOA2MejlK2DAjiC6YKTbTSAG0lBrKeEx56e8=; b=JnJoLDdO3Cr3yxlTa2CqxnmoSJWnIgeN9bE1GtOXbZrEi3HH/aUCbqqMPQ1XBmuuDJ CufWXNwnV9NyvbwBtELZ+WkzLZdqsS56GMSgC3kQHMqjWqfnT54P/ue6lfRVzzV1rzES wv7OaWRhgrmMWDNDK1pwopJLJlxnEoS5IjKy8hCTeBmUwvvlS+7icQS5kLusciC2wXhC /hjwWCtRUTnnm1EOpgUHfBmvsFlrP2rmD8SQkTzy4+4aCHWzXXDc+KhJObrWWetXXoMe tujFvcq7DTJF0XhdEM/hvgE+S9mIuWOC9YkMxDtHXmov36dPVh6XKcOavrVzsBQbmrbn VAOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WoEf2mJXOA2MejlK2DAjiC6YKTbTSAG0lBrKeEx56e8=; b=SdjWnXCjc7yGv5jgsEDwTp7Gj8zlBteilSwB8o46TxpR/jkf6g12yjY2fLhVR8g8TB ARP51IkkLw6vP60K24JwK+tJ1xup5fpKlb254ur5BXFJDo5fapg7u8EkaLO+h0B26bLe VbShWj4J6gKqfpvwCPJCQbc3P6Kg1SMvrXYnmspWBjBvBUNCXIosOVdQOrKjS+JGXgYK WkAJKuObcgyPd9HBpPCMKQLWrz6Je2vd8Qx7J4qTTINYXIGLrQ9Ht2If4M4bWIRDAPyX 9TuGzATZOS8ibU/18BShPuSi2jFvLclXm5NNRfuMyCaYvalDqvrLIZhvYiUFERfCQpjm LJeg== X-Gm-Message-State: AOAM531xEXexYaBTwkwiBjru7UbIuvFithY3IvQbp9U8GdNGSyQ700r7 0aleAMSY9BrtPjM1EPzXeNw= X-Google-Smtp-Source: ABdhPJz4fy3tXiRYqOmcuYo/xV2Tcspgny8tZwqZ8dotVRB60Ql+BGevhIlTyHp9NNG1v3J4MWNoaw== X-Received: by 2002:a17:90a:4f05:b0:1df:afae:180b with SMTP id p5-20020a17090a4f0500b001dfafae180bmr2507522pjh.80.1652861689818; Wed, 18 May 2022 01:14:49 -0700 (PDT) Received: from localhost ([1.157.44.177]) by smtp.gmail.com with ESMTPSA id d7-20020a056a00244700b00512ee2f2363sm1290401pfj.99.2022.05.18.01.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 01:14:48 -0700 (PDT) Date: Wed, 18 May 2022 18:14:45 +1000 From: Balbir Singh To: CGEL Cc: Roman Gushchin , Shakeel Butt , Yang Shi , Michal Hocko , Andrew Morton , Johannes Weiner , Matthew Wilcox , Miaohe Lin , William Kucharski , Peter Xu , Hugh Dickins , Vlastimil Babka , Muchun Song , Suren Baghdasaryan , Linux Kernel Mailing List , Linux MM , Cgroups , Yang Yang Subject: Re: [PATCH] mm/memcg: support control THP behaviour in cgroup Message-ID: References: <6275d3e7.1c69fb81.1d62.4504@mx.google.com> <6278fa75.1c69fb81.9c598.f794@mx.google.com> <6279c354.1c69fb81.7f6c1.15e0@mx.google.com> <627b1d39.1c69fb81.fe952.6426@mx.google.com> <627b2df5.1c69fb81.4a22.160f@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <627b2df5.1c69fb81.4a22.160f@mx.google.com> X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 59BE31000CD X-Stat-Signature: xfkk8eu6yden64x8rp3fhuimd7orkz55 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=JnJoLDdO; spf=pass (imf14.hostedemail.com: domain of bsingharora@gmail.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=bsingharora@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1652861688-115195 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, May 11, 2022 at 03:31:00AM +0000, CGEL wrote: > On Tue, May 10, 2022 at 08:11:16PM -0700, Roman Gushchin wrote: > > On Tue, May 10, 2022 at 07:47:29PM -0700, Shakeel Butt wrote: > > > On Tue, May 10, 2022 at 7:19 PM CGEL wrote: > > > > > > > [...] > > > > > > > > > > > > > > All controls in cgroup v2 should be hierarchical. This is really > > > > > > > required for a proper delegation semantic. > > > > > > > > > > > > > > > > > > > Could we align to the semantic of /sys/fs/cgroup/memory.swappiness? > > > > > > Some distributions like Ubuntu is still using cgroup v1. > > > > > > > > > > Other than enable flag, how would you handle the defrag flag > > > > > hierarchically? It is much more complicated. > > > > > > > > Refer to memory.swappiness for cgroup, this new interface better be independent. > > > > > > Let me give my 0.02. I buy the use-case of Admin restricting THPs to > > > low priority jobs but I don't think memory controller is the right > > > place to enforce that policy. Michal gave one way (prctl()) to enforce > > > that policy. Have you explored the BPF way to enforce this policy? > > > > +1 for bpf > > > > I think these THP hints are too implementation-dependent and unstable to become > > a part of cgroup API. > > > > Thanks! If no other suggesting we will submit a bpf version of this patch. > What is your proposal for BPF? How do you intend to add attach points (attach_type) for policy? Is it still going to be per cgroup? Balbir Singh