dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Peter.Enderborg@sony.com
Cc: willy@infradead.org, neilb@suse.de, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, adobriyan@gmail.com,
	linaro-mm-sig@lists.linaro.org, shakeelb@google.com,
	rppt@kernel.org, samitolvanen@google.com,
	songmuchun@bytedance.com, linux-fsdevel@vger.kernel.org,
	akpm@linux-foundation.org, christian.koenig@amd.com, guro@fb.com,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v5] dma-buf: Add DmaBufTotal counter in meminfo
Date: Wed, 21 Apr 2021 12:57:28 +0200	[thread overview]
Message-ID: <YIAFGF4QFX92WG/I@dhcp22.suse.cz> (raw)
In-Reply-To: <cbde932e-8887-391f-4a1d-515e5c56c01d@sony.com>

On Wed 21-04-21 10:37:11, Peter.Enderborg@sony.com wrote:
> On 4/21/21 11:15 AM, Daniel Vetter wrote:
[...]
> > We need to understand what the "correct" value is. Not in terms of kernel
> > code, but in terms of semantics. Like if userspace allocates a GL texture,
> > is this supposed to show up in your metric or not. Stuff like that.
> That it like that would like to only one pointer type. You need to know what
> 
> you pointing at to know what it is. it might be a hardware or a other pointer.
> 
> If there is a limitation on your pointers it is a good metric to count them
> even if you don't  know what they are. Same goes for dma-buf, they
> are generic, but they consume some resources that are counted in pages.
> 
> It would be very good if there a sub division where you could measure
> all possible types separately.  We have the detailed in debugfs, but nothing
> for the user. A summary in meminfo seems to be the best place for such
> metric.

I strongly suspect that the main problem of this patch (and its previous
versions) is that you are failing to explain the purpose of the counter
to others. From what you have said so far it sounds like this is a
number which is nice to have because gives us more than nothing. And
while this is not really hard to agree with it doesn't really meet the
justification for exporting yet another counter to the userspace with
all the headache of the future maintenance. I think it would hugely help
to describe a typical scenario when the counter would be useful and the
conclusion you can draw from the exported value or a set of values over
time.

And please note that a mixed bag of different memory resources in a
single counter doesn't make this any easier because then it essentially
makes it impossible to know whether an excessive usage contribues to RAM
or device memory depletion - hence this is completely bogus for the OOM
report.
-- 
Michal Hocko
SUSE Labs
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-04-21 10:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 16:38 [PATCH v5] dma-buf: Add DmaBufTotal counter in meminfo Peter Enderborg
2021-04-20  8:58 ` Daniel Vetter
2021-04-20  9:26   ` Peter.Enderborg
2021-04-20  9:41     ` Mike Rapoport
2021-04-20 10:45       ` Peter.Enderborg
2021-04-20 11:52         ` Mike Rapoport
2021-04-20 12:03           ` Peter.Enderborg
2021-04-20 11:14     ` Daniel Vetter
2021-04-20 11:37       ` Peter.Enderborg
2021-04-21  9:15         ` Daniel Vetter
2021-04-21 10:37           ` Peter.Enderborg
2021-04-21 10:57             ` Michal Hocko [this message]
2021-04-21 13:05             ` Pekka Paalanen
2021-04-21 15:31             ` Mike Rapoport
2021-04-21 17:35               ` Peter.Enderborg
2021-04-22  8:06                 ` Mike Rapoport
2021-04-22 14:08                   ` Peter.Enderborg
2021-04-25  7:33                     ` Mike Rapoport
2021-04-25  8:40                       ` Peter.Enderborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YIAFGF4QFX92WG/I@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=Peter.Enderborg@sony.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guro@fb.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=rppt@kernel.org \
    --cc=samitolvanen@google.com \
    --cc=shakeelb@google.com \
    --cc=songmuchun@bytedance.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).