Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5148438pxj; Wed, 9 Jun 2021 10:12:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxEznMr1BIgdJus/2CRwYA1kHCiuEzJfx09HYApAcRsUu7/aDFoBUxgJ5jKL6IF3sXmdu6 X-Received: by 2002:a17:906:b210:: with SMTP id p16mr869807ejz.100.1623258750644; Wed, 09 Jun 2021 10:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258750; cv=none; d=google.com; s=arc-20160816; b=U9PQSMmRyHgnemHNYmxLAINkUSOU+9x1WEBcAlHj7LzLKmGV5LFB/9thimoJRjkGG1 MUAdNzMKnZn6K8vZp2PAVE24xHLHnlrC3KxGsZjvaMZwKHX2sfh5zv/KVqNNNtm6aztP pX3HPrYj7YoUo7lZGVt1pIgg1Rr5eZFmDisW4yQ0WQpAn7/RYjPbTtrXzk8vpZawEf/a 8jWoTJm2+VEWsYHNzoysccM4jnOS5asc0H76Q4N+dsIpMyFpaSYParTms6y1QNdCpfj1 TnddAaBT+uEmmElrjpcb0LKbOVQPpRhqR2Ypl/JAdzhGE2dr0IuWbx/uzYPv6Slp5jSd EuEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=kVT9Wuov+fRYoU3sLNfjd77k6pdOwuTohVxQr00iHkA=; b=Hg3/UU6ApNcbnXv8xQG4mDvRrw/QKA5/RP0LUXT/0FUwg+IX9Icu+UfeNA0NXay1nt kYmjHtmoiJpMxPaD7W85QHYUdBRPA1Rn+RtN2yd6So2AKtl3Q5wlMmYR8Y7vGyBABgXo 70C/TfyUq7e1vl02r7TcBfC9wPrBFnWdWqH1ub8xkOQjfW2YpNw5QHVgYySE8V2kbMQY bXXNLO31RH4hfZ5Cu8fHjZMyistYcGN7nDJo4Y7I12xFqa+X+tpaosx1V7OukdHWFfKY lYC7WYOtj6ZO18YcA6UHwS+D6sb21m2fFeZi/8uFR4BW0TmPC4MyT65MG5mxHGpmKH4P cf7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yd19si259439ejb.717.2021.06.09.10.12.07; Wed, 09 Jun 2021 10:12:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237582AbhFIITA (ORCPT + 99 others); Wed, 9 Jun 2021 04:19:00 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:45353 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236085AbhFIIS7 (ORCPT ); Wed, 9 Jun 2021 04:18:59 -0400 Received: from [192.168.1.155] ([77.9.120.3]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Md6AP-1lIexq0haV-00aHkm; Wed, 09 Jun 2021 10:16:29 +0200 Subject: Re: [PATCH v1] proc: Implement /proc/self/meminfo To: Chris Down , legion@kernel.org Cc: LKML , Linux Containers , Linux Containers , Linux FS Devel , linux-mm@kvack.org, Andrew Morton , Christian Brauner , "Eric W . Biederman" , Johannes Weiner , Michal Hocko References: From: "Enrico Weigelt, metux IT consult" Message-ID: Date: Wed, 9 Jun 2021 10:16:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: tl Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:7koxO5BYDpAqMJLkjAi8sQ3UCPPXcTQYX99ymXS5Xqgz0nlGGuK Hxb+ndUGgPuVDZUuZ5nTXtCvHrxWi4iW5JK0j7U974MtjWtMY2aS0VLI/KED+rz6ayZZcA4 Xx0b/USmKF42nW+OADIYE9NI4u/lRQ5grSAxY4BuHtuBMJUcJGwP8P+bG/xzNZubYSDqN5Y CvXBoBECUCVPaja1xu0uw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:wo5zd+VdzY0=:WzJo4B1hGsN1c/G3OJ0Xqi 6bpG3QrMz5EWv5/XdALXVYgynfY8jHF6cxC7hhR2eU2/KHVsemxVCEraCnDbGV53VFq6EnrN8 YQpMSx+JVivz86PrADc2V+zC0jT06VAeYEOSKmg8swZ56AkcZDAzVS79YbmHeRB1IJeWW0RXf BjRzusAphKr5cqYTAuAFaasm9whF+e8iwijwWttQ92Illd9ID6Y4aessHWfAiYZyECH1RpWrQ lyV7Mvu7T0dIuaG4IQKEcRtk0BDd8BI9r90T8R+4kvYa4ZzpV/psMBg9f6+ebwZ+kOdSBHTQR hhxk7Qabba6bWe8261ONlT8xDldTIAIMqE5UpWg1nwK4xhZqAoKW477qAeeKDNjDzTw1OXn3r vuTDCU5CfxyHcXDFDDPDmBk9tPOe6a8eGXLo5Ei98A+HVdcPrMacgSPaJdcavMwBWqkK/0dOi q4XlbR4XfeoLD+0Nv0/QdoQgyq5YpSVeCAdJaI0oPxn+HTLmFszQMLleS73jOaVzWhxpPNWlp zWWEXt3f11Y7HY4FlDEUm0= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.06.21 13:33, Chris Down wrote: Hi folks, > Putting stuff in /proc to get around the problem of "some other metric I > need might not be exported to a container" is not a very compelling > argument. If they want it, then export it to the container... > > Ultimately, if they're going to have to add support for a new > /proc/self/meminfo file anyway, these use cases should just do it > properly through the already supported APIs. It's even a bit more complex ... /proc/meminfo always tells what the *machine* has available, not what a process can eat up. That has been this way even long before cgroups. (eg. ulimits). Even if you want a container look more like a VM - /proc/meminfo showing what the container (instead of the machine) has available - just looking at the calling task's cgroup is also wrong. Because there're cgroups outside containers (that really shouldn't be affected) and there're even other cgroups inside the container (that further restrict below the container's limits). BTW: applications trying to autotune themselves by looking at /proc/meminfo are broken-by-design anyways. This never has been a valid metric on how much memory invididual processes can or should eat. --mtx -- --- Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren GPG/PGP-Schlüssel zu. --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287