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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93D40C47095 for ; Wed, 9 Jun 2021 08:16:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 11A8D61059 for ; Wed, 9 Jun 2021 08:16:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11A8D61059 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=metux.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6ABE26B0036; Wed, 9 Jun 2021 04:16:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 65C306B006E; Wed, 9 Jun 2021 04:16:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D61A6B0070; Wed, 9 Jun 2021 04:16:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id 1DB376B0036 for ; Wed, 9 Jun 2021 04:16:38 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9CE368249980 for ; Wed, 9 Jun 2021 08:16:37 +0000 (UTC) X-FDA: 78233478834.14.8139B0E Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by imf19.hostedemail.com (Postfix) with ESMTP id 6D3EA9001E40 for ; Wed, 9 Jun 2021 08:16:32 +0000 (UTC) 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 X-Provags-ID: V03:K1:7koxO5BYDpAqMJLkjAi8sQ3UCPPXcTQYX99ymXS5Xqgz0nlGGuK Hxb+ndUGgPuVDZUuZ5nTXtCvHrxWi4iW5JK0j7U974MtjWtMY2aS0VLI/KED+rz6ayZZcA4 Xx0b/USmKF42nW+OADIYE9NI4u/lRQ5grSAxY4BuHtuBMJUcJGwP8P+bG/xzNZubYSDqN5Y CvXBoBECUCVPaja1xu0uw== 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= Authentication-Results: imf19.hostedemail.com; dkim=none; spf=none (imf19.hostedemail.com: domain of lkml@metux.net has no SPF policy when checking 217.72.192.74) smtp.mailfrom=lkml@metux.net; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 6D3EA9001E40 X-Stat-Signature: nh4ypxxd146ur6fidsargswh63a9xsn4 X-HE-Tag: 1623226592-927681 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.003340, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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=20 > need might not be exported to a container" is not a very compelling=20 > argument. If they want it, then export it to the container... >=20 > Ultimately, if they're going to have to add support for a new=20 > /proc/self/meminfo file anyway, these use cases should just do it=20 > 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 --=20 --- Hinweis: unverschl=C3=BCsselte E-Mails k=C3=B6nnen leicht abgeh=C3=B6rt u= nd manipuliert werden ! F=C3=BCr eine vertrauliche Kommunikation senden Sie bitte ihren GPG/PGP-Schl=C3=BCssel zu. --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287