Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3175269pxb; Tue, 20 Apr 2021 02:13:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziqQ5fjqHtZ7Oxdqbcvb95nIKV5uCoHWGavjncjRLJlMh7qlQHOEjV++6jl5Gqd7HUvsqI X-Received: by 2002:a62:e10f:0:b029:25f:2272:2560 with SMTP id q15-20020a62e10f0000b029025f22722560mr9937698pfh.47.1618910005644; Tue, 20 Apr 2021 02:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618910005; cv=none; d=google.com; s=arc-20160816; b=JCrYfrzWX36oWey93GtGQwJmTx6PH7p8bLkWjZj/ITz3fdbY8OR2POCPr6e48D1W39 hS8V5rKaXZk66gu2At88JMKwyjIdMnajjsgZD2ypeejzWwc/MeIIfIFr/Ekuq7Qbiuuu lqOg2/DIrT4Yt2tTgFFEEf5Wyb+YAw9Chkh5ReFj1UsQ35foYhASs8ZuDtbtxbCGUqUI UgXvwnk4aRW7ikAEArd+kd58eW3J0xlF2L7CuzzExcpKKQLN9YM/ThkLgejNv6DSR6KZ 3x2Ia0Ps0bgU/UY/FU43tmUyn5qTaIwlsJEDZTFu0ET5B3dCrWlmlwasSM8O/672BdX6 s57g== 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=P/BmEPBKTeOFguvQ2qBlwcHcEEfovS+ifTPNFePUZCk=; b=NVY3J+ZggK1Zi1IxRsXMn18zhEXl/FHpl8/INJKQYVQGDanVSOTxUeBTUlDQvSShyc JRGEA6s3IgWxYOnTjcVg0IeDslmvutxhctmlvVnSFkqAvb2DUZ9+7jBgcVqLNAzQF4mo HwdXzLUlGMfhUSpODzm2saoLQJQnJ4gQ8gQNlWKtLnRoJYSGfB5FKqEZ4kuL6nC/7E0p 5B5iAs+luFTUb82xrer2E8V3dtsMUHYAU8HzJi+DENe2WeAv6r01jiuM0unNKBNaw7k3 +tIi4Be5PUfc1Uc73J5CiMPvMxCuGnYhls+y2/c0JM0ucK/cyybXRvgPZi2b4vtnpCIR nCWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=R5GsHcSJ; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si13347962plx.358.2021.04.20.02.13.13; Tue, 20 Apr 2021 02:13:25 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=R5GsHcSJ; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231258AbhDTJNJ (ORCPT + 99 others); Tue, 20 Apr 2021 05:13:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:42996 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbhDTJNH (ORCPT ); Tue, 20 Apr 2021 05:13:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1618909955; 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=P/BmEPBKTeOFguvQ2qBlwcHcEEfovS+ifTPNFePUZCk=; b=R5GsHcSJibcbHlBRzrzGN94SKJ7cYaMlDSfB2NhAQZy1yVY6Sam2aaojFN8kuuVAmMeJvr MmqcwgqtHPe6i8jwmzp+WFbXpe+rwEkxBMmXP6nsLS80NKGRfSKxoHoA5B8kpg0wS40pT4 AUy/xXjVA7r3cstTCTWGotHbxkta9rM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CEF61B4A6; Tue, 20 Apr 2021 09:12:34 +0000 (UTC) Date: Tue, 20 Apr 2021 11:12:33 +0200 From: Michal Hocko To: Peter.Enderborg@sony.com Cc: christian.koenig@amd.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, sumit.semwal@linaro.org, adobriyan@gmail.com, akpm@linux-foundation.org, songmuchun@bytedance.com, guro@fb.com, shakeelb@google.com, neilb@suse.de, samitolvanen@google.com, rppt@kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, willy@infradead.org Subject: Re: [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo Message-ID: References: <23aa041b-0e7c-6f82-5655-836899973d66@sony.com> <07ed1421-89f8-8845-b254-21730207c185@amd.com> <5efa2b11-850b-ad89-b518-b776247748a4@sony.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5efa2b11-850b-ad89-b518-b776247748a4@sony.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 20-04-21 09:02:57, Peter.Enderborg@sony.com wrote: > > >> But that isn't really system memory at all, it's just allocated device > >> memory. > > OK, that was not really clear to me. So this is not really accounted to > > MemTotal? If that is really the case then reporting it into the oom > > report is completely pointless and I am not even sure /proc/meminfo is > > the right interface either. It would just add more confusion I am > > afraid. > > > > Why is it confusing? Documentation is quite clear: Because a single counter without a wider context cannot be put into any reasonable context. There is no notion of the total amount of device memory usable for dma-buf. As Christian explained some of it can be RAM based. So a single number is rather pointless on its own in many cases. Or let me just ask. What can you tell from dma-bud: $FOO kB in its current form? -- Michal Hocko SUSE Labs