Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2480891ybn; Thu, 26 Sep 2019 12:32:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxd9PzeiLm6kqkHzkHviRvwGwG6JAfNrpwpG5ur88HkTJ2iQchsXPoe3jSm7jqmGDwJ2LEV X-Received: by 2002:a50:f616:: with SMTP id c22mr466506edn.235.1569526351637; Thu, 26 Sep 2019 12:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569526351; cv=none; d=google.com; s=arc-20160816; b=s550mEZjJkQSPg35+qzDIBwLtn6Ix6O/Co3n+3qPewRbVlEifmkP5FFj09dcrY/NYE H8YKUbezqqbn3RazYiQgl+SBdfjq/Bxvhy6Hka08md0WisV2iqCYygYCysRlNHnCpPZ8 VpmA2Q2drqsry8Bd6FkGtpE5Lp2svyNxid1DVGKh1LBm6AxZd+4NxWur27q7uz1SvcTJ xhbPHEA7FHsEZt2+AC6IVUFyp5PjiXcjiJ3VcCK73a6r4SIfmYdn+JxSuL+F8XSUtKXC 3LwVscQ5T7xtKgefxJTxRP5+oH6HOa9QstIbtZkgnPP55jf5Pz2PD+YP4gaTpFUcliG1 9GFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=MPY9mLobCsFCdGTyhVub8qrg9jLGGnIpfTk+BisJCH8=; b=IycJZqZWQPlrSew9ZZSAs4R5BFwsPXZXrfn2HD+0A5jEcJgnAxeb0tox6bNovxh93S V/P80TP/qle982yeQvS7h0UEtSy5yIVePIlCM0TMy3ICuW28CgkQ4boUReBGLaT1a4LL cCAycTiWOnWj+v+iZg1S9M07Xs8GJuGZKP2C/Tkvtq2/Q01OcvBv84qEQYhtvpP1+/pb lF5RQ33LGJv1MHR3zPH709A7c3zVCJ0ItKO1Kyt5/qYrqhF3WrluOytRWCjsF6FnP902 MCeim0Cr1FtPe5ZS3lLctNYHbB6+birrdNnkRT1JVuDp9BK1SU0GwvFz3tL+2D+6w4KP u+aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VYrL4qkf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l23si140081eds.310.2019.09.26.12.32.08; Thu, 26 Sep 2019 12:32:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VYrL4qkf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728684AbfIZT2P (ORCPT + 99 others); Thu, 26 Sep 2019 15:28:15 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:35986 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728604AbfIZT2P (ORCPT ); Thu, 26 Sep 2019 15:28:15 -0400 Received: by mail-pl1-f194.google.com with SMTP id f19so60840plr.3 for ; Thu, 26 Sep 2019 12:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=MPY9mLobCsFCdGTyhVub8qrg9jLGGnIpfTk+BisJCH8=; b=VYrL4qkfnIoJrXhQd4N/uNnqbiyr0k4cU5NBaiNVQ648M7nmosCB93lB4YioJ8uFMn 66ApM6ofqMqBsXccCOTc4B4eMP5whHQ/qS1OvSBcwUVi5afpmn1lOiMb6dKwFhnHJIbJ KYjML4oqBtqr88sdA6pv1lxhcELEjTl06Y7scpK3CarFPh8/khNXk7ftZqi710Db2oms nfRxRuETzBWF0hjP9Is7uo9VGJpqPAozmDMQRme3O+FTd0J5h5Id+Ydm1aUx3NXI+sh0 BEa7zLccBudk4dj6ZlnVUCwcLP9gpavNz9Me5fn7dxcwJgNbiAIc1520e1/MBu9vS2hk aQ2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=MPY9mLobCsFCdGTyhVub8qrg9jLGGnIpfTk+BisJCH8=; b=kNjW4/idjYiIzMrvQw5mrlpVQNAFiEjNPJuvfXFTIJe8YdV48HG9hAhc+juzODhLhQ 78IDLNZW6w7wa43ztoW0pGU9kmPwXpcWRtYpt/pmw5CvNp/9rpJDHB9xI0CXHQPOPZ4D OnI7wtQfHzjT9Ihp2GO0ZqfLuI06ZUPJbD8jlpwAAtUpkCH5Sg2GKST+sVoFFcx1DI3S FEeYeGtidw08yJFM0Rfy+Lj2Mvb6hHuUb5MjKomXsShmZzgTpeU3PkhypVrgt9EPYzLb pUjdm0TMe8mPJVb5++BCH8R4IL+97urlQprkyUJ55yQ604llSrWzQddB4Nt1sKdiFEjf 2hbQ== X-Gm-Message-State: APjAAAXIRG+PxfvaaQoXlgKnpwSa9HTu8fIqGAG3dpAiytW6bSIvfHqz 4nEwHUx34XTuzA+EZCLpgAz8sw== X-Received: by 2002:a17:902:720a:: with SMTP id ba10mr215767plb.328.1569526093196; Thu, 26 Sep 2019 12:28:13 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id c125sm66697pfa.107.2019.09.26.12.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 12:28:12 -0700 (PDT) Date: Thu, 26 Sep 2019 12:28:11 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Mina Almasry cc: Mike Kravetz , Aneesh Kumar , shuah , Shakeel Butt , Greg Thelen , Andrew Morton , khalid.aziz@oracle.com, open list , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, =?UTF-8?Q?Michal_Koutn=C3=BD?= Subject: Re: [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits In-Reply-To: Message-ID: References: <20190919222421.27408-1-almasrymina@google.com> <3c73d2b7-f8d0-16bf-b0f0-86673c3e9ce3@oracle.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Sep 2019, Mina Almasry wrote: > > I personally prefer the one counter approach only for the reason that it > > exposes less information about hugetlb reservations. I was not around > > for the introduction of hugetlb reservations, but I have fixed several > > issues having to do with reservations. IMO, reservations should be hidden > > from users as much as possible. Others may disagree. > > > > I really hope that Aneesh will comment. He added the existing hugetlb > > cgroup code. I was not involved in that effort, but it looks like there > > might have been some thought given to reservations in early versions of > > that code. It would be interesting to get his perspective. > > > > Changes included in patch 4 (disable region_add file_region coalescing) > > would be needed in a one counter approach as well, so I do plan to > > review those changes. > > OK, FWIW, the 1 counter approach should be sufficient for us, so I'm > not really opposed. David, maybe chime in if you see a problem here? > From the perspective of hiding reservations from the user as much as > possible, it is an improvement. > > I'm only wary about changing the behavior of the current and having > that regress applications. I'm hoping you and Aneesh can shed light on > this. > I think neither Aneesh nor myself are going to be able to provide a complete answer on the use of hugetlb cgroup today, anybody could be using it without our knowledge and that opens up the possibility that combining the limits would adversely affect a real system configuration. If that is a possibility, I think we need to do some due diligence and try to deprecate allocation limits if possible. One of the benefits to separate limits is that we can make reasonable steps to deprecating the actual allocation limits, if possible: we could add warnings about the deprecation of allocation limits and see if anybody complains. That could take the form of two separate limits or a tunable in the root hugetlb cgroup that defines whether the limits are for allocation or reservation. Combining them in the first pass seems to be very risky and could cause pain for users that will not detect this during an rc cycle and will report the issue only when their distro gets it. Then we are left with no alternative other than stable backports and the separation of the limits anyway.